[Improvement] Add grant_type=password when use gravitino spark/flink runtime to submit the spark/flink job
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### What would you like to be improved?
for example use spark examples, now the connector runtime jar support `grant_type=client_credentials` for client authentication (from https://gravitino.apache.org/docs/1.2.0/security/how-to-authenticate/), but we can't use user authentication.
the code snippet now is
```
private static Map clientCredentialsRequest(
String clientId, String clientSecret, List scopes) {
ImmutableMap.Builder formData = ImmutableMap.builder();
formData.put(GRANT_TYPE, CLIENT_CREDENTIALS);
if (clientId != null) {
formData.put(CLIENT_ID, clientId);
}
formData.put(CLIENT_SECRET, clientSecret);
formData.put(SCOPE, toScope(scopes));
return formData.build();
}
```
### How should we improve?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.