-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/stateless auth sso #73
base: main
Are you sure you want to change the base?
Conversation
…O Opaque token and generate session on server side
…O Opaque token and generate session on server side
@@ -54,7 +46,14 @@ spring: | |||
- undertow-https-redirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this packaging is not used for local dev only but also for our docker image, do we want ldap by default ?
chutney/server/src/main/java/com/chutneytesting/security/api/SsoOpenIdConnectController.java
Show resolved
Hide resolved
...er/src/main/java/com/chutneytesting/security/infra/memory/InMemorySecurityConfiguration.java
Show resolved
Hide resolved
chutney/server/src/main/java/com/chutneytesting/security/ChutneyWebSecurityConfig.java
Show resolved
Hide resolved
chutney/server/src/main/java/com/chutneytesting/security/ChutneyWebSecurityConfig.java
Show resolved
Hide resolved
|
chutney/server/src/main/java/com/chutneytesting/security/api/UserController.java
Show resolved
Hide resolved
return extractClaim(token, Claims::getExpiration); | ||
} | ||
|
||
private String createToken(Map<String, Object> claims, String subject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not forge a token with an local issuer for chutney ? and add chutney authorizations as claims/scopes ?
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) { | ||
var userDetails = userDetailsServices.stream().map(service -> { | ||
try { | ||
return service.loadUserByUsername(username); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why call the underlying user details service ? You need only to retrieve the chutney authorizations from the corresponding service given the username, i think.
#SPDX-FileCopyrightText: 2017-2024 Enedis | ||
#SPDX-License-Identifier: Apache-2.0 | ||
|
||
spring: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all configs required here ? Seems a bit redondant.
@@ -86,6 +86,10 @@ | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter-security</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter-oauth2-client</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not just a resource server ?
oidc: | ||
user-info-uri: "${auth.sso.issuer}/userinfo" | ||
|
||
auth: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use chutney.
as prefix
- mem-auth | ||
- db-sqlite | ||
|
||
auth: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use .chutney
prefix.
No description provided.