Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add OAUTH2 usage #105

Merged
merged 3 commits into from
Sep 12, 2024
Merged

Add OAUTH2 usage #105

merged 3 commits into from
Sep 12, 2024

Conversation

arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Sep 10, 2024

Add OAUTH2 support.
Based on: trento-project/web#2953

Usage example (keycloak):

helm install trento-server . ... --set trento-web.trentoWebOrigin=myOrigin --set trento-web.oauth2.enabled=true --set trento-web.oauth2.clientId="client" --set trento-web.oauth2.clientSecret="somesecret" --set trento-web.oauth2.baseUrl="http://idphost:8081/realms/trento" --set trento-web.oauth2.authorizeUrl="http://idphost:8081/realms/trento/protocol/openid-connect/auth" --set trento-web.oauth2.tokenUrl="http://idphost:8081/realms/trento/protocol/openid-connect/token" --set trento-web.oauth2.userUrl="http://idphost:8081/realms/trento/protocol/openid-connect/userinfo" --set trento-web.oauth2.scopes="openid profile email"

Attention: the configured urls must be reachable by the k3s containers. Don't use localhost

@arbulu89 arbulu89 added the enhancement New feature or request label Sep 10, 2024
@arbulu89 arbulu89 marked this pull request as ready for review September 10, 2024 10:25
Copy link
Member

@EMaksy EMaksy left a comment

Choose a reason for hiding this comment

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

LGTM

authorizeUrl: ""
tokenUrl: ""
userUrl: ""
scopes: "profile email"
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a scopes value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. If I don't set the default value (the same we have in the runtime), as helm will always populate this value (even with an empty string), this would be the passed value, and sending an empty string doesn't look appropriate

Copy link
Member

Choose a reason for hiding this comment

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

Ah okay i wondered because we had here an empty string trento-project/ansible@3bd8cf2#diff-018072a0a2fd65ea8a5deb35db17eb24ec9297cc2fffd3ec7979e6cf402577e7R37.
Thanks for clarification!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add the default actually in the ansible code.
thanks!

@arbulu89 arbulu89 merged commit bfcabb4 into main Sep 12, 2024
7 checks passed
@arbulu89 arbulu89 deleted the add-oauth2-usage branch September 12, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants