[Improvement] GVFS need to reuse UsergroupInformation credential
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 315
Description
### What would you like to be improved?
Now, GVFS needs the configuration
```
/** The authentication type for simple authentication. */
public static final String SIMPLE_AUTH_TYPE = "simple";
/** The authentication type for oauth2 authentication. */
public static final String OAUTH2_AUTH_TYPE = "oauth2";
/** The authentication type for kerberos authentication. */
public static final String KERBEROS_AUTH_TYPE = "kerberos";
// oauth2
/** The configuration key prefix for oauth2 */
public static final String FS_GRAVITINO_CLIENT_OAUTH2_PREFIX = "fs.gravitino.client.oauth2.";
/** The configuration key for the URI of the default OAuth server. */
public static final String FS_GRAVITINO_CLIENT_OAUTH2_SERVER_URI_KEY =
"fs.gravitino.client.oauth2.serverUri";
/** The configuration key for the client credential. */
public static final String FS_GRAVITINO_CLIENT_OAUTH2_CREDENTIAL_KEY =
"fs.gravitino.client.oauth2.credential";
/** The configuration key for the path which to get the token. */
public static final String FS_GRAVITINO_CLIENT_OAUTH2_PATH_KEY =
"fs.gravitino.client.oauth2.path";
/** The configuration key for the scope of the token. */
public static final String FS_GRAVITINO_CLIENT_OAUTH2_SCOPE_KEY =
"fs.gravitino.client.oauth2.scope";
/** The configuration key prefix for kerberos */
public static final String FS_GRAVITINO_CLIENT_KERBEROS_PREFIX = "fs.gravitino.client.kerberos.";
/** The configuration key for the principal. */
public static final String FS_GRAVITINO_CLIENT_KERBEROS_PRINCIPAL_KEY =
"fs.gravitino.client.kerberos.principal";
/** The configuration key for the keytab file path corresponding to the principal. */
public static final String FS_GRAVITINO_CLIENT_KERBEROS_KEYTAB_FILE_PATH_KEY =
"fs.gravitino.client.kerberos.keytabFilePath";
/** The configuration key for the maximum capacity of the Gravitino fileset cache. */
public static final String FS_GRAVITINO_FILESET_CACHE_MAX_CAPACITY_KEY =
"fs.gravitino.fileset.cache.maxCapacity";
```
Actually, we should reuse the UserGroupInformation, especially for simple mode and Kerberos mode.
For simple mode. we should keep consistent with `UserGroupInformation.getCurrentUser`
For Keberos mode, we should keep consistent with `UserGroupInformation.getCredentials`.
### How should we improve?
ctually, we should reuse the UserGroupInformation, especially for simple mode and Kerberos mode.
For simple mode. we should keep consistent with `UserGroupInformation.getCurrentUser`
For Keberos mode, we should keep consistent with `UserGroupInformation.getCredentials`.
Contributor guide
Research direction
Start by locating the GVFS authentication and configuration code, then trace how simple and Kerberos modes currently obtain credentials. Compare those paths with UserGroupInformation.getCurrentUser and UserGroupInformation.getCredentials; done means both modes consistently reuse the UserGroupInformation state without requiring duplicate configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100