lasdf1234 opened a new pull request, #11214: URL: https://github.com/apache/gravitino/pull/11214
### What changes were proposed in this pull request? - Add `BasicAuthenticator` in `plugins/idp-basic` to validate HTTP Basic credentials against built-in IdP user metadata (Argon2id password hash via `PasswordHasher`). - Resolve authenticated user groups from `IdpUserMetaService.listGroupNamesByUsername()` and attach them to `UserPrincipal` for downstream authorization. - Register `AuthenticatorType.BASIC` and wire `basic` → `org.apache.gravitino.idp.auth.BasicAuthenticator` in `AuthenticatorFactory`. - Use `compileOnly` for `:api` and `:server-common` in `idp-basic` so the plugin JAR does not bundle server dependencies. - Add unit tests in `idp-basic` and `server-common` (`TestBasicAuthentication`) covering authenticator behavior and `AuthenticationFilter` integration. Fix: #10965 ### Why are the changes needed? Issue #10965 tracks the Basic authentication subtask under local authentication (#10959). Gravitino needs an HTTP Basic authenticator backed by the built-in IdP so clients can authenticate with username/password and receive group memberships for authorization. ### Does this PR introduce _any_ user-facing change? Yes. When `gravitino.authenticators` includes `basic`, clients can authenticate with built-in IdP username/password via HTTP Basic. Requires the `idp-basic` plugin JAR on the server classpath. ### How was this patch tested? - [x] `./gradlew :plugins:idp-basic:test --tests "org.apache.gravitino.idp.auth.TestBasicAuthenticator" -PskipITs -PskipDockerTests=true` - [x] `./gradlew :server-common:test --tests "org.apache.gravitino.server.authentication.TestBasicAuthentication" -PskipITs -PskipDockerTests=true` Made with [Cursor](https://cursor.com) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
