Skip to content

feat(build): extract authmgr-oauth2-agent module with no Iceberg dependency#241

Open
adutra wants to merge 1 commit into
dremio:mainfrom
adutra:authmgr-agent
Open

feat(build): extract authmgr-oauth2-agent module with no Iceberg dependency#241
adutra wants to merge 1 commit into
dremio:mainfrom
adutra:authmgr-agent

Conversation

@adutra
Copy link
Copy Markdown
Contributor

@adutra adutra commented May 22, 2026

Fixes #239.

Introduces a new :authmgr-oauth2-agent Gradle module containing the entire OAuth2 token engine (OAuth2Agent, all Flow implementations, OAuth2Config, and every supporting subpackage) with zero Iceberg compile-time dependencies, making it usable by non-Iceberg callers (custom REST clients, Kafka connectors, ad-hoc tooling).

:authmgr-oauth2-core is now a thin two-class Iceberg SPI adapter (OAuth2Manager + OAuth2Session). Bundle modules (runtime, standalone) continue to shadow :authmgr-oauth2-core and pick up the agent transitively; their sources/javadoc JARs now merge both modules.

Test fixtures are split accordingly: agent testFixtures contain the Iceberg-free TestEnvironment and all expectation helpers; core testFixtures add IcebergTestEnvironment extends TestEnvironment and IcebergRestExpectation for the two Iceberg-specific catalog mocks.

The new :authmgr-oauth2-agent module now has a new root package: com.dremio.iceberg.authmgr.oauth2.agent. The existing :authmgr-oauth2-core keeps its current package:
com.dremio.iceberg.authmgr.oauth2, in order to avoid user-facing regressions since this module contains the Auth Manager implementation.

.hasMessageContaining("Failed to read PEM file")
.rootCause()
.hasMessageContaining("not enough content");
.hasMessageContaining("Illegal base64 character");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now using the JDK decoder, not Apache Commons brought transitively by Iceberg.

@SuppressWarnings("resource")
public PolarisContainer() {
super("apache/polaris:1.3.0-incubating");
super("apache/polaris:1.5.0");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but quite consensual I hope :-)

* limitations under the License.
*/
package com.dremio.iceberg.authmgr.oauth2.config.validator;
package com.dremio.iceberg.authmgr.oauth2.agent.config.validator;
Copy link
Copy Markdown

@dimas-b dimas-b May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this module is not supposed to have Iceberg deps, having iceberg in the package name looks odd 🤔

…ndency

Fixes dremio#239.

Introduces a new `:authmgr-oauth2-agent` Gradle module containing the
entire OAuth2 token engine (`OAuth2Agent`, all `Flow` implementations,
`OAuth2Config`, and every supporting subpackage) with zero Iceberg
compile-time dependencies, making it usable by non-Iceberg callers
(custom REST clients, Kafka connectors, ad-hoc tooling).

`:authmgr-oauth2-core` is now a thin two-class Iceberg SPI adapter
(`OAuth2Manager` + `OAuth2Session`). Bundle modules (`runtime`,
`standalone`) continue to shadow `:authmgr-oauth2-core` and pick up the
agent transitively; their sources/javadoc JARs now merge both modules.

Test fixtures are split accordingly: agent `testFixtures` contain the
Iceberg-free `TestEnvironment` and all expectation helpers; core
`testFixtures` add `IcebergTestEnvironment extends TestEnvironment` and
`IcebergRestExpectation` for the two Iceberg-specific catalog mocks.

The new `:authmgr-oauth2-agent` module now has a new root package:
`com.dremio.iceberg.authmgr.oauth2.agent`. The existing
`:authmgr-oauth2-core` keeps its current package:
`com.dremio.iceberg.authmgr.oauth2`, in order to avoid user-facing
regressions since this module contains the Auth Manager implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Extract OAuth2Agent to a separate module

2 participants