* Initial Refactor
Pulled out logic specific to auth mechanisms into separate traits. Updated
constructors for Controllers to take new traits.
The crux of introducing pac4j is to abstract away the details of authentication.
Most of the concerns come into play with custom action building. Abstracting
away the old OIDC code will pave the way for using pac4j OIDC
* Another refactor
The dependency injection caused issues with the old refactor. This refactor was
proven by actually running the application.
* DRY out tests
* Fixing merge conflicts
* Update LDAP to handle more explicit cases so that UserDoesNotExistException is only returned when it truly does not exist and there are no other external factors.
* Update tests.
* Update return condition for findUserDetails, only allowing UserDoesNotException to indicate success.
The root cause for the authentication error is that the portal
was not decrypting the user secret key before signing requests.
This is solved via the following:
1. Update VinylDNS controller to decrypt user secret when needed
1. Make sure that the `encrypt-user-secrets` feature flag is `on`
in the API reference.conf. This was why in testing locally we
did not hit the same issue that we saw in the development environment.
Because the flag was false, test users secrets were not encrypted.
* `portal application.conf` - set the crypto to match the API
* `Dependencies.scala` - eliminate some duplication of dependencies
* `api reference.conf` - set the encrypt-user-secrets flag to true
* `TestApplicationData.scala` - modify the mock play app to have a
CryptoAlgebra binding
* `VinylDNS` - add secret decryption in getUserCreds and processCSV
* `VinylDNSModule` - add binding for CryptoAlgebra for dependency
injection.
Replace the repos in the portal with dynamodb and core
* Remove all data stores from the portal
* Use the user and user change repository from core and dynamodb
* Remove the UserAccount type, use core User instead
* Remove the UserChangeLog types, use core UserChange instead
* Clean up duplication in VinylDNS
* Moved `Module` to `modules.VinylDNSModule`. The reason is that
you cannot disable the "default" module for unit tests.
* Use mock configuration for VinylDNSSpec and FrontendControllerSpec.
The mock app configuration is what allows us to run without dynamodb
* Added a TestApplicationData trait to cut down on duplication