Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Affected Issue(s): Extend OAuth 2.0 support #1186

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

muhammad-levi
Copy link
Collaborator

@muhammad-levi muhammad-levi commented Sep 13, 2024

Description of what I changed

Resolves #1193, https://github.com/sid-indonesia/it-team/issues/333

What this commit has achieved:

  1. Added support for Body Authentication on Client Credentials flow
  2. TODO implement OAuth 2.0 for sink FHIR Server.

E2E test

TESTED:

Please replace this with a description of how you tested your PR beyond the
automated e2e/unit tests.

Checklist: I completed these to help reviewers :)

  • I have read and will follow the review process.

  • I am familiar with Google Style Guides for the language I have coded in.

    No? Please take some time and review Java and Python style guides.

  • My IDE is configured to follow the Google code styles.

    No? Unsure? -> configure your IDE.

  • I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

  • I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@muhammad-levi muhammad-levi marked this pull request as draft September 13, 2024 09:49
@bashir2
Copy link
Collaborator

bashir2 commented Sep 19, 2024

Thanks @muhammad-levi for adding body-authentication option to the client-credentials flow. I think the general approach you are taking is fine. You should be able to catch/fix the compilation failure issue (I think you need to update FetchUtilTest.java). Please feel free to remove the Draft tag and assign this to me for review, once it is ready.

@bashir2
Copy link
Collaborator

bashir2 commented Sep 19, 2024

BTW, I cannot see https://github.com/sid-indonesia/it-team/issues/333; it would be nice to file an issue in this repo and reference it in your PR.

@muhammad-levi
Copy link
Collaborator Author

muhammad-levi commented Sep 20, 2024

@bashir2 Okay, thank you. I was planning to add the OAuth 2.0 support to the sink FHIR Server as well, but not doing it yet as other higher priority tasks arise.

BTW, I cannot see https://github.com/sid-indonesia/it-team/issues/333; it would be nice to file an issue in this repo and reference it in your PR.

Alright, I will file an issue in this repo.

Preconditions.checkNotNull(tokenEndpoint);
Preconditions.checkNotNull(clientSecret);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot to change this to oAuthMechanism.

@bashir2
Copy link
Collaborator

bashir2 commented Sep 20, 2024

@bashir2 Okay, thank you. I was planning to add the OAuth 2.0 support to the sink FHIR Server as well, but not doing it yet as other higher priority tasks arise.

If you can test this in your local environment (with the custom FHIR server you have) that should be enough for now (plus proper unit-tests). We don't have e2e test coverage for other authentication methods either. We should add them at some point but I don't want to hold this PR on that, if you need this feature now. Adding OAuth support to the test sink FHIR server is probably not trivial as we need other components too (e.g., token issuer).

Resolves sid-indonesia/it-team#333

What this commit has achieved:
1. Added support for Body Authentication on Client Credentials flow
2. TODO implement OAuth 2.0 for sink FHIR Server.
@muhammad-levi muhammad-levi force-pushed the feature_oauth2.0-client-credentials-body-authentication branch from bd0ffb7 to eb97b98 Compare September 23, 2024 01:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enrich OAuth 2.0 support: Add body authentication of Client Credentials flow
2 participants