[midPoint-git] [Evolveum/connector-scimrest] 38b078: Introduce HttpRequestDTO and HttpRequestConverter ...
Tony Tkáčik
noreply at github.com
Tue Apr 28 11:06:06 CEST 2026
Branch: refs/heads/main
Home: https://github.com/Evolveum/connector-scimrest
Commit: 38b0781bf34d912afedf493db79dbc9ffde7ad95
https://github.com/Evolveum/connector-scimrest/commit/38b0781bf34d912afedf493db79dbc9ffde7ad95
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
A common/src/main/java/com/evolveum/polygon/scimrest/api/AuthorizationCustomizer.java
A common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestConverter.java
A common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestDTO.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AbstractGroovyRestConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/ConnectorContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingAuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/EndpointBasedSearchBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/FilterToRequestMapper.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/PagingHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestHandlerBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestSearchOperationHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestUpdateOperationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/HttpVersion.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/RestSearchEndpointBuilder.java
A common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/JdkHttpRequestConverter.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestPagingAwareObjectRetriever.java
Log Message:
-----------
Introduce HttpRequestDTO and HttpRequestConverter for clean HTTP abstraction
Replaces the ad-hoc RequestBuilder inner class with a protocol-agnostic
HttpRequestDTO data carrier and an HttpRequestConverter<T> functional
interface, implemented by JdkHttpRequestConverter for java.net.http.
Adds AuthorizationCustomizer<C> generic interface and HttpVersion enum
(independent of java.net.http) to complete the api-layer contract.
Commit: 849ce9fa7a0d87633e4a3c357826ae9e2f574ad3
https://github.com/Evolveum/connector-scimrest/commit/849ce9fa7a0d87633e4a3c357826ae9e2f574ad3
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/GroovyOAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2Context.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2GroovyHookTests.java
Log Message:
-----------
Add Groovy hook support for OAuth2 token lifecycle customization
Introduces GroovyOAuth2TokenManager extending OAuth2TokenManager with
four hook points (buildTokenRequest, parseTokenResponse, validateToken,
applyToken) that can be configured via Groovy scripts using the new
oauth2 { } block in the authentication DSL.
Adds getAt/putAt to OAuth2Context for idiomatic Groovy [] operator access
to the shared context state across hook stages.
Commit: 07d6645c6a62fcb83758ca1b417f684628123f84
https://github.com/Evolveum/connector-scimrest/commit/07d6645c6a62fcb83758ca1b417f684628123f84
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AbstractGroovyRestConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/schema/RestSchemaBuilder.java
Log Message:
-----------
Fix initialization order so authentication is configured before SCIM discovery
Groovy scripts register authentication in initializeObjectClassHandler(), so handlers
must be built before REST and SCIM clients are initialized. Previously, SCIM discovery
made HTTP calls before any authentication was in place.
Also split SCIM contributions into two phases: schema contribution happens before the
single schema build, handler contribution happens after — so context.schema() is
available when ScimContext.contributeToHandlers() resolves object classes.
Commit: 5506693d09e0fa4a87be65e74a8169e076af0721
https://github.com/Evolveum/connector-scimrest/commit/5506693d09e0fa4a87be65e74a8169e076af0721
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-26 (Sun, 26 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AbstractGroovyRestConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/ConnectorContext.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingScimAuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestHandlerBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
A common/src/main/java/com/evolveum/polygon/scimrest/impl/scim/JerseyRequestCustomizerFilter.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/scim/ScimContext.java
Log Message:
-----------
Add scim{} DSL auth block and wire ScimContext with AuthorizationCustomizer<ScimClientConfiguration>
- ScimContext now receives AuthorizationCustomizer<ScimClientConfiguration> instead of
hardcoded bearer token handling; auth applied via JerseyRequestCustomizerFilter
- Add JerseyRequestCustomizerFilter implementing ClientRequestFilter — applies headers,
query params, method and body from HttpRequestDTO to Jersey ClientRequestContext
- Add DispatchingScimAuthorizationCustomizer with first-match dispatch by config type
- Register default handlers for ScimClientConfiguration.BearerToken and HttpBasic
in AuthorizationCustomizationBuilderImpl
- Expose scim{} DSL block (ScimBuilder) in AuthenticationCustomizationBuilder
with bearer() and httpBasic() convenience methods
Commit: c2d6121a0b0057a130a61db118eac56788ce1d81
https://github.com/Evolveum/connector-scimrest/commit/c2d6121a0b0057a130a61db118eac56788ce1d81
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/config/ScimClientConfiguration.java
Log Message:
-----------
Align ScimClientConfiguration.OAuth2Authorization with RestClientConfiguration.OAuth2Authorization
Rename OAuthGrant to OAuth2Authorization for consistency and add missing
fields: tokenUrl, grantType (with client_credentials default), privateKey.
Commit: 3ade5fe87d49cca9bd446bf54e73c5ae618fff3b
https://github.com/Evolveum/connector-scimrest/commit/3ade5fe87d49cca9bd446bf54e73c5ae618fff3b
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2Context.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2TokenManager.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2GroovyHookTests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ManualIntegrationTest.java
Log Message:
-----------
Introduce OAuth2Context.Config to decouple token manager from config interfaces
Add nested Config record to OAuth2Context with factory methods for both
RestClientConfiguration.OAuth2Authorization and ScimClientConfiguration.OAuth2Authorization.
Refactor OAuth2TokenManager to accept OAuth2Context.Config instead of
RestClientConfiguration.OAuth2Authorization directly.
Commit: 4ede93347788f985fafeed07cdfac697e6910554
https://github.com/Evolveum/connector-scimrest/commit/4ede93347788f985fafeed07cdfac697e6910554
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2ClientCredentialsTests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2GroovyHookTests.java
Log Message:
-----------
Add OAuth2 support for SCIM authentication via Groovy DSL
Register ScimClientConfiguration.OAuth2Authorization handler in scimDispatcher
using OAuth2Context.Config. Add scim { oauth2 { ... } } DSL block with separate
GroovyOAuth2TokenManager instance for SCIM, parallel to rest { oauth2 { ... } }.
Add ScimOAuth2ClientCredentialsTests and ScimOAuth2GroovyHookTests covering token
fetch, reuse, correct request parameters, and all four hook points.
Commit: 9b46d7e59a3d18cf5f7ccd0e0be533a232802517
https://github.com/Evolveum/connector-scimrest/commit/9b46d7e59a3d18cf5f7ccd0e0be533a232802517
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
A common/src/test/java/com/evolveum/polygon/scimrest/exception/AbstractOAuth2Tests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/AbstractScimOAuth2Tests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ClientCredentialsTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2GroovyHookTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2JwtBearerTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2ClientCredentialsTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2GroovyHookTests.java
Log Message:
-----------
Refactor OAuth2 tests to use common base classes
Introduce AbstractOAuth2Tests and AbstractScimOAuth2Tests to provide a shared
foundation for OAuth2 related test cases. Migrate existing tests to utilize
these base classes to eliminate duplication in WireMock stubbing and
connector initialization logic.
Commit: b11b3828b6c089b45a22f7112b150d34180118bb
https://github.com/Evolveum/connector-scimrest/commit/b11b3828b6c089b45a22f7112b150d34180118bb
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/api/AuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestConverter.java
R common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestDTO.java
A common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestSpecification.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingAuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingScimAuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/EndpointBasedSearchBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/FilterToRequestMapper.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/GroovyOAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/PagingHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestSearchOperationHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/RestSearchEndpointBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/JdkHttpRequestConverter.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestPagingAwareObjectRetriever.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/scim/JerseyRequestCustomizerFilter.java
Log Message:
-----------
Rename HttpRequestDto to HttpRequestSpecification
Commit: ed04cdbe0ad02f4c9f3f5a6d6f386695b96b5bca
https://github.com/Evolveum/connector-scimrest/commit/ed04cdbe0ad02f4c9f3f5a6d6f386695b96b5bca
Author: Jan Kamenicky <jan.kamenicky at evolveum.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AbstractGroovyRestConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ConnectorDevelopmentKit.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ConnectorManifest.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ManifestBasedConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ReadOnlyConnector.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/AbstractScimOAuth2Tests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ClientCredentialsTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2GroovyHookTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2JwtBearerTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ManualIntegrationTest.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimExceptionSimulationTest.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/TestRestConnector.java
A common/src/test/java/com/evolveum/polygon/scimrest/groovy/InitializationOrderTest.java
M common/src/test/java/com/evolveum/polygon/scimrest/groovy/ScimDevTest.java
M connector/forgejo/src/main/java/com/evolveum/polygon/forgejo/ForgejoConnector.java
M connector/forgejo/src/main/resources/connector.manifest.json
M connector/open-project/src/main/java/com/evolveum/polygon/openProject/OpenProjectConnector.java
M connector/sample-scimdev/src/main/java/com/evolveum/polygon/sample/scimdev/ScimDevConnector.java
Log Message:
-----------
Split initializeObjectClassHandler into auth and handler phases
Handler scripts reference schema attributes (e.g. attribute("id")) at init
time, requiring the schema to be built first. Auth scripts must run before
REST/SCIM clients are initialized so authentication is in place for discovery.
Introduce initializeAuthorizationHandler() (abstract) that runs before client
init, and keep initializeObjectClassHandler() running after schema is built.
ManifestBasedConnector reads auth scripts from the new "authorization" section
in connector.manifest.json. Forgejo and OpenProject connectors updated to use
the new AuthorizationCustomizer<RestClientConfiguration> API.
Commit: ccd0c2355225642c189e1980653b7479ab27d222
https://github.com/Evolveum/connector-scimrest/commit/ccd0c2355225642c189e1980653b7479ab27d222
Author: Tony Tkáčik <tonydamage at users.noreply.github.com>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
A common/src/main/java/com/evolveum/polygon/scimrest/api/AuthorizationCustomizer.java
A common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestConverter.java
A common/src/main/java/com/evolveum/polygon/scimrest/api/HttpRequestSpecification.java
M common/src/main/java/com/evolveum/polygon/scimrest/config/ScimClientConfiguration.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AbstractGroovyRestConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/AuthorizationCustomizationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/ConnectorContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingAuthorizationCustomizer.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/DispatchingScimAuthorizationCustomizer.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/EndpointBasedSearchBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/FilterToRequestMapper.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/GroovyOAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/PagingHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestHandlerBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestSearchOperationHandler.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/RestUpdateOperationBuilderImpl.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/AuthenticationCustomizationBuilder.java
A common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/HttpVersion.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/api/RestSearchEndpointBuilder.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ConnectorDevelopmentKit.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ConnectorManifest.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ManifestBasedConnector.java
M common/src/main/java/com/evolveum/polygon/scimrest/groovy/impl/ReadOnlyConnector.java
A common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/JdkHttpRequestConverter.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2Context.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/OAuth2TokenManager.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/rest/RestPagingAwareObjectRetriever.java
A common/src/main/java/com/evolveum/polygon/scimrest/impl/scim/JerseyRequestCustomizerFilter.java
M common/src/main/java/com/evolveum/polygon/scimrest/impl/scim/ScimContext.java
M common/src/main/java/com/evolveum/polygon/scimrest/schema/RestSchemaBuilder.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/AbstractOAuth2Tests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/AbstractScimOAuth2Tests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ClientCredentialsTests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2GroovyHookTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2JwtBearerTests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/OAuth2ManualIntegrationTest.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimExceptionSimulationTest.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2ClientCredentialsTests.java
A common/src/test/java/com/evolveum/polygon/scimrest/exception/ScimOAuth2GroovyHookTests.java
M common/src/test/java/com/evolveum/polygon/scimrest/exception/TestRestConnector.java
A common/src/test/java/com/evolveum/polygon/scimrest/groovy/InitializationOrderTest.java
M common/src/test/java/com/evolveum/polygon/scimrest/groovy/ScimDevTest.java
M connector/forgejo/src/main/java/com/evolveum/polygon/forgejo/ForgejoConnector.java
M connector/forgejo/src/main/resources/connector.manifest.json
M connector/open-project/src/main/java/com/evolveum/polygon/openProject/OpenProjectConnector.java
M connector/sample-scimdev/src/main/java/com/evolveum/polygon/sample/scimdev/ScimDevConnector.java
Log Message:
-----------
Merge pull request #7 from Evolveum/feature/basic-jwt-authorization
Add OAuth2 support for SCIM authentication and Groovy DSL hooks
Compare: https://github.com/Evolveum/connector-scimrest/compare/d621e3fc8248...ccd0c2355225
To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/connector-scimrest/settings/notifications
More information about the midPoint-svn
mailing list