#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.
-
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 thePublicKeyclass intact for the current endpoint and created a new classPublicKeySetthat 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.
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
dk1844
left a comment
There was a problem hiding this comment.
See the comments, otherwise LGTM 😃
Release Notes:
closes #45