-
Notifications
You must be signed in to change notification settings - Fork 0
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
#45 have a set of keys instead of just one #111
#45 have a set of keys instead of just one #111
Conversation
…ttps://github.com/AbsaOSS/login-service into feature/45-have-a-set-of-keys-instead-of-just-one
JaCoCo code coverage report - scala:2.12.17
|
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.
-
I am wondering if it makes sense to distinguish current and old publicKey for the clients -- whether just not give them a set/list (then we can be generic of what we give them in the future and they just have to trust the public keys as a set -- one of them should be the signing one).
-> so I would rather keep thePublicKey
class intact for the current endpoint and created a new classPublicKeySet
that would serve the new purpose. -
I don't see the functionality where the previous publicKey is phased out after some time has passed after the rotation - and I don't see a configuration for these timeouts either
api/src/main/scala/za/co/absa/loginsvc/rest/controller/TokenController.scala
Outdated
Show resolved
Hide resolved
if(secretsOption.isEmpty) | ||
throw new Exception("Error retrieving username and password from from AWS Secrets Manager") | ||
|
||
val secrets = secretsOption.get |
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.
I think option processing can be done better without calling Option.get
e.g. via
secretsOption.fold(
throw new Exception("Error retrieving username and password from from AWS Secrets Manager")
){ secrets =>
(secrets(usernameFieldName), secrets(passwordFieldName))
}
or more explicitly via
secretsOption match {
case None => throw new Exception("Error retrieving username and password from from AWS Secrets Manager")
case Some(secrets) =>
(secrets(usernameFieldName), secrets(passwordFieldName))
}
api/src/main/scala/za/co/absa/loginsvc/rest/controller/TokenController.scala
Outdated
Show resolved
Hide resolved
|
#45 a suggestion to add sso to be able to use `aws sso login` to dev-launch LS
…ttps://github.com/AbsaOSS/login-service into feature/45-have-a-set-of-keys-instead-of-just-one
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.
See the comments, otherwise LGTM 😃
api/src/main/scala/za/co/absa/loginsvc/rest/service/jwt/JWTService.scala
Outdated
Show resolved
Hide resolved
api/src/main/scala/za/co/absa/loginsvc/rest/service/jwt/JWTService.scala
Outdated
Show resolved
Hide resolved
api/src/main/scala/za/co/absa/loginsvc/rest/service/jwt/JWTService.scala
Outdated
Show resolved
Hide resolved
api/src/main/scala/za/co/absa/loginsvc/utils/AwsSecretsUtils.scala
Outdated
Show resolved
Hide resolved
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.
LGTM
Release Notes:
closes #45