All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Updated to the latest dependencies to bring in fixes for scala 3 compatibility
- keycloak4s-admin-ce3 now available
MapperTypes
enum -AdvancedRole
added
- Upgraded to sttp3
EventTypes
enum - Expanded with new types added in Keycloak 13
TokenManager
- Updated to handle client-credentials grant type where no refresh token is returned
KeycloakClient
- Added automatically retrying, using a new access token, to requests that return a 401 unauthorized error
TokenManager
- Updated to retrieve a new access token when call to refresh token fails
SecurityDirective
- Renamed toSecurityDirectives
ValidationDirective
- Renamed toValidationDirectives
AuthDirectives
,SecurityDirectives
andValidationDirectives
- changed from object to trait
Observable.walk
to useObservable.unfoldEval
Observable.walk
extension function.AsyncState
used byObservable.walk
- unnecessary Akka dependencies from
keycloak4s-admin
andkeycloak4s-admin-monix
modules.
- sbt release to handle automatic releases to Maven Central
PathAuthorization
- Added parameter to determine whether to match the full request path or unmatched request path against the configured policy rules.
PathAuthorization
- Fixed bug with wildcard paths when an empty request path is evaluated.
- updated various dependencies
- deprecation warnings for Scala Test
issueAccessToken
function inTokenManager
made public.
- Renamed
RequiredAction
case class toAuthRequiredAction
due to naming conflict with an enum. User
case class no longer uses incorrect type forrequiredActions
field.Users.sendActionsEmail
- changedactions
parameter toList[RequiredAction]
.
- Added
plainText
implicit def toBodyMagnet
to support sending text/plain contentType. - Added new credential calls to
Users
. - Removed deprecated calls
disable-credential-types
andremove-totp
. - Removed
optional
field fromAuthenticationExecution
. - Added
Conditional
value to theRequirements
enum. - Updated
Credential
case class.
- Fixed
User.Update
case class - made all fields optional and defaulted toNone
.
- Dependency updates
- Support for cross compiling added so that Scala 2.12 and 2.13 versions can be published.
- Fixed issue causing refresh token requests to fail when using the client secret credential type.
- Fixed bug in createAndRetrieve functions not short-circuiting when the create operation fails.
- Updated various library dependencies.
- Updated Scala version to 2.13
- Fixed a bug in TokenValidator resulting from the fact that Keycloak's internal URL builder drops common ports from the ISS.
- ConfigWithoutAuth; a version of KeycloakConfig that does not contain admin authentication details.
- Fixed a flaw in attemptBuild in PolicyBuilders.scala that could potentially throw a FileNotFoundException in certain environments.
- Core functionality in the Akka-HTTP auth module has been split into a separate module to allow code reuse by any client adapter.
- Transformed KeycloakConfig into a trait, with ConfigWithAuth and ConfigWithoutAuth as subtypes.
- KeycloakConfig.Auth split into two subtypes, Secret and Password, to additionally support a password grant type.
- Updated EventTypes to support additions for Keycloak 7.0.0
- Modified create calls for services to return the created resource's UUID.
- Changed the functions for evaluating user access to be stack safe.
- Documentation has been added.
- KeycloakClient in the Monix submodule now takes a parameter for the type of byte collection used by the backend for streaming.
- The changelog is now separate from the readme.
- Modified the authorization "secure" function to return the bearer tokens' payloads if successful.
- Renamed RealmRepresentation to Realm, EventRepresentation to Event, and RolesRepresentation to Roles.
- Moved case classes that are only implemented inside other case classes to their companion objects.
- Rewrote all admin javadocs to follow a standard.
- Renamed admin functions to follow a standard.
- Removed the MonixHttpBackendL from the playground module.
- Added missing Clients service calls with the path /{realm}/clients/{id}/scope-mappings.
- Created an Update model for Group.
- Separated all client-scope calls from the Clients service into a new ClientScopes service.
- Updated the Groups service update function to take the new Group.Update model.
- Removed the ScopeMappings service and moved the functions out into the Clients and ClientScopes services as necessary.
- Groups service role mapping functions (add and remove) now take Role.Mapping case class.
- Changed the fields in the Role.Mapping case class to be mandatory.
- Fixed logging for requests sent to Keycloak being evaluated eagerly.
- Added an And/Or data structure for better configuration of required roles on a path.
- Added support for UUID ( /{id}/ ) segments in configured paths.
- Added policy enforcement object builders.
- Expanded logging to cover authorization.
- Added a new policy config structure that uses full paths to define rules instead of rules configured on nodes for each segment of the request path.
- TokenValidator now has a validateParallel function that parses and validates an access and ID token asynchronously.
- Leeway for the exp, iat and nbf fields can now be specified in the TokenValidator constructor.
- TokenValidator's validate function now only accepts one token.
- TokenValidator's constructor now requires the URI scheme to be specified.
- Removed the initial authorisation directives in favour of the policy configuration based authorisation.
- Added new models and enumerators for Keycloak services.
- Fixed multiple small issues encountered during integration testing.
- Added a json security security structure that is used to configure security for a server.
- Added a security directive that handles auth at the top level of the directive structure, using the above json config.
- Added an integration test suite and a bootstrap for a fresh Keycloak server instance to test on.
- Added integration tests for User, Realm, Role, Group and Client calls.
- Minor model and function fixes for issues exposed by the integration tests.
- Fixed an illegal reflection warning by changing how a throwable was being handled by the Akka directives.
- Functions returning Observables in the Monix module have been modified to no longer return Eithers. Instead they are processed so that the right gets extracted while the left causes an exception to be thrown.
- Added detailed logging for the token validation in the Admin module.
- Created an implicit Class for Payload that adds extraction helper functions.
- Modified the token validation process to return the full payloads of the bearer and ID tokens.
- Fixed failing unit tests caused by lack of an implicit correlationId in the tests.
- Fixed token endpoint scheme to use the scheme defined in KeycloakConfig as opposed to being hard coded.
- Observable streaming to relevant get calls in Roles, Clients and RealmsAdmin in the monix module.
- Updated the getList streaming call to return Eithers in accordance with update to all other calls.
- Renamed functions in RealmsAdmin to match project standards.
- Modified KeycloakClient in the monix module to extend that in the base module instead of duplicating code.
- Modified the logging for successful Admin API requests to log the raw response instead of the deserialized response.
- Moved models from admin module to core.
- Added proper logging for the Admin module.
- Injected a correlation ID into the Admin API calls.
- Created core module.
- Created playground module.
- Renamed "keycloak4s" module to "keycloak4s-admin".
- Renamed "keycloak4s-adapters" module to "keycloak4s-auth".
- Renamed "keycloak4s-monix" module to "keycloak4s-admin-monix".
- Moved core functionality from the auth, admin and monix modules to the newly created core module. Refactored as necessary.
- Moved sandbox code from the auth, admin and monix modules to the newly created playground module. Expanded sandbox code.