Skip to content

Conversation

@MonkeyCanCode
Copy link
Contributor

@MonkeyCanCode MonkeyCanCode commented Sep 27, 2025

Add credential reset option for #2197

Sample output:

# profile `dev` has the root credential
# profile `test_user` contains the non-root credential

# happy path: don't provide anything and fall back to system random generated
➜  polaris git:(cli_reset_credential) ✗ ./polaris --profile dev principals reset test
{"clientId": "e469c048cf866df1", "clientSecret": "1f37adcd21bf1586ed090332eded9cd3"}

# happy path: provided a new client id and get system random generated secret
➜  polaris git:(cli_reset_credential) ✗ ./polaris --profile dev principals reset --new-client-id e469c048cf866df2 test
{"clientId": "e469c048cf866df2", "clientSecret": "4fa23cdd051f76bdee2f43d854f01897"}

# happy path: provided a new client secret and keep the existed client id
➜  polaris git:(cli_reset_credential) ✗ ./polaris --profile dev principals reset --new-client-secret e469c048cf866dfae469c048cf866df1 test
{"clientId": "e469c048cf866df2", "clientSecret": "e469c048cf866dfae469c048cf866df1"}

# Failure path: attempt to perform reset with non-root principal
➜  polaris git:(cli_reset_credential) ✗ ./polaris --debug --profile test_user principals reset --new-client-secret e469c048cf866dfae469c048cf866df1 test
Exception when communicating with the Polaris server. ForbiddenException: Only Root principal(service-admin) can perform RESET_CREDENTIALS

jbonofre
jbonofre previously approved these changes Sep 27, 2025
Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

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

Lgtm thanks !

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Sep 27, 2025
Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

LGTM!

@MonkeyCanCode MonkeyCanCode merged commit 0764745 into apache:main Sep 28, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Sep 28, 2025
fabio-rizzo-01 added a commit to fabio-rizzo-01/polaris that referenced this pull request Sep 29, 2025
This PR contains no functional and no user-facing change. It is merely a refactor to better organize auth code.

Summary of changes:

- Moved all internal authentication components to the `org.apache.polaris.service.auth.internal` package and subpackages
- Reduced visibility of utility classes
- Renamed `TokenBroker` class hierarchy to stick to the naming standard: `<Algorithm>JWTBroker`
- Introduced `@PolarisImmutable` whenever appropriate
- Removed unused `NoneTokenBrokerFactory` (we already have `DisabledOAuth2ApiService`)
- Removed unused `TokenBrokerFactoryConfig`

Enhancement : adding support for Aurora postgres AWS IAM authentication (apache#2650)

Add support for postgres AWS IAM authentication using the `apache-client` lib.

Remove unused `name` arg from findCatalogByName in PolarisAdminService (apache#2691)

* remove unused name param

* Rename for better readability

Fix a race condition in sendNotification where concurrent parent-namespace creation causes failures (apache#2693)

* Fix a race condition in sendNotification where concurrent parent-namespace creation causes failures

The semantics of the createNonExistingNamespaces method used during sendNotification were supposed
to be "create if needed". However, the behavior ended up surfacing an AlreadyExistsException
if multiple concurrent sendNotification attempts were made for a brand-new namespace (where
the notifications may be different tables). This would cause a table sync to fail if a sibling
table was being synced at the same time, even though the new table should successfully get created
under the shared namespace.

* Also better future-proof the createNamespaceInternal logic by explicitly
checking for ENTITY_ALREADY_EXISTS, per review suggestion.

Log a less scary message since it's not an error scenario type of race
condition, per review suggestion

Client: add credential reset option (apache#2698)

* Client: add credential reset option

* Client: add credential reset option

* Client: add credential reset option

* Add integration testing

* Fix lint

fix(deps): update dependency software.amazon.awssdk:bom to v2.34.5 (apache#2702)

fix(deps): update dependency com.gradleup.shadow:shadow-gradle-plugin to v9.2.2 (apache#2661)

added Aurora postgres to metastore documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants