-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#2711] feat(filesystem): Support Kerberos client authentication in gvfs #3314
Conversation
@qqqttt123 When I write a unit test that only configures the |
You should use host name instead of ip. |
You should provide more error information. |
The test like this:
I wiil get this error:
|
Oh. I got it. You can't test the ticket cache in the UT. It can only be tested by hand. |
Got it, I'll test it locally. |
docs/how-to-use-gvfs.md
Outdated
| `fs.gravitino.client.oauth2.credential` | The auth credential for the Gravitino client when using `oauth2` auth type in the Gravitino Virtual File System. | (none) | Yes if you use `oauth2` auth type | 0.5.0 | | ||
| `fs.gravitino.client.oauth2.path` | The auth server path for the Gravitino client when using `oauth2` auth type with the Gravitino Virtual File System. Please remove the first slash `/` from the path, for example `oauth/token`. | (none) | Yes if you use `oauth2` auth type | 0.5.0 | | ||
| `fs.gravitino.client.oauth2.scope` | The auth scope for the Gravitino client when using `oauth2` auth type with the Gravitino Virtual File System. | (none) | Yes if you use `oauth2` auth type | 0.5.0 | | ||
| `fs.gravitino.client.kerberos.principal` | The auth principal for the Gravitino client when using `kerberos` auth type with the Gravitino Virtual File System. | (none) | Yes if you use `kerberos` auth type | 0.5.1 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jerryshao Do we need backport this pr to branch-0.5
? My initial thought is to release it in 0.5.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should.
@qqqttt123 I pulled up the KDC Docker image locally and registered |
You should add these to the segment |
Done |
…vfs (#3314) ### What changes were proposed in this pull request? Support using Kerberos authentication type to initialize Gravitino client in gvfs. ### Why are the changes needed? Fix: #2711 ### How was this patch tested? Add some uts for: 1. use principal and keytab to auth. 2. kerberos configs for gvfs. 3. some invalid kerberos case. Test locally and use `kerberos ticket cache` to initialize gvfs. The steps are as follows: 1. Deploy the KDC server locally, refer to the doc: https://blog.csdn.net/lo085213/article/details/105057186. 2. Register the service account `HTTP/localhost@HADOOP.COM` and client account `client@HADOOP.COM` in the KDC server. 3. Execute the `kinit -kt client.keytab client@HADOOP.COM` command locally. 4. Use the `klist` command to check the environment for tickets containing `client@HADOOP.COM`. 5. Write a unit test to load metalake through gvfs with the kerberos ticket cache. ![image](https://github.com/datastrato/gravitino/assets/26177232/f655e687-8412-4000-bb07-bd9ccadd8387) ![image](https://github.com/datastrato/gravitino/assets/26177232/a3d36646-37ad-44b9-8cca-129a18196663) ![image](https://github.com/datastrato/gravitino/assets/26177232/df7504a2-046d-45fa-9da3-7b681ebfd7e1) --------- Co-authored-by: xiaojiebao <xiaojiebao@xiaomi.com>
…n in gvfs (apache#3314) ### What changes were proposed in this pull request? Support using Kerberos authentication type to initialize Gravitino client in gvfs. ### Why are the changes needed? Fix: apache#2711 ### How was this patch tested? Add some uts for: 1. use principal and keytab to auth. 2. kerberos configs for gvfs. 3. some invalid kerberos case. Test locally and use `kerberos ticket cache` to initialize gvfs. The steps are as follows: 1. Deploy the KDC server locally, refer to the doc: https://blog.csdn.net/lo085213/article/details/105057186. 2. Register the service account `HTTP/localhost@HADOOP.COM` and client account `client@HADOOP.COM` in the KDC server. 3. Execute the `kinit -kt client.keytab client@HADOOP.COM` command locally. 4. Use the `klist` command to check the environment for tickets containing `client@HADOOP.COM`. 5. Write a unit test to load metalake through gvfs with the kerberos ticket cache. ![image](https://github.com/datastrato/gravitino/assets/26177232/f655e687-8412-4000-bb07-bd9ccadd8387) ![image](https://github.com/datastrato/gravitino/assets/26177232/a3d36646-37ad-44b9-8cca-129a18196663) ![image](https://github.com/datastrato/gravitino/assets/26177232/df7504a2-046d-45fa-9da3-7b681ebfd7e1) --------- Co-authored-by: xiaojiebao <xiaojiebao@xiaomi.com>
What changes were proposed in this pull request?
Support using Kerberos authentication type to initialize Gravitino client in gvfs.
Why are the changes needed?
Fix: #2711
How was this patch tested?
Add some uts for:
Test locally and use
kerberos ticket cache
to initialize gvfs. The steps are as follows:HTTP/localhost@HADOOP.COM
and client accountclient@HADOOP.COM
in the KDC server.kinit -kt client.keytab client@HADOOP.COM
command locally.klist
command to check the environment for tickets containingclient@HADOOP.COM
.