-
-
Notifications
You must be signed in to change notification settings - Fork 4
Support user authentication using Kerberos #436
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
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
1510569
WIP
sbernauer aadb976
Merge remote-tracking branch 'origin/main' into feat/kerberos-reloaded
sbernauer fcbda97
Use resolver 2
sbernauer a556214
fix clippy lint
sbernauer 6e3e898
Improve test and let it pass
sbernauer f3ffa66
Merge remote-tracking branch 'origin/main' into feat/kerberos-reloaded
sbernauer 92a9063
Improve test output
sbernauer 8bea542
revert tests/test-definition.yaml
sbernauer a8d2156
(hopefully) fix tests
sbernauer 85bdb9c
fix more tests
sbernauer 74c261e
Merge remote-tracking branch 'origin/main' into feat/kerberos-reloaded
sbernauer 5485d0e
snafufy
sbernauer f922e50
fix: Set rest server http and ui ports correctly
sbernauer 1ae79a8
vector container shall be the last in the list
sbernauer 6e12f13
fix probe
sbernauer c31b113
Add test to check restserver
sbernauer db94e91
increase test timeout
sbernauer e151092
minor cleanup
sbernauer 1b44f55
fix: Also "sed" core-site and hdfs-site
sbernauer a4070ba
add docs
sbernauer 90ed2ee
remove ycsb.yaml
sbernauer b934309
docs link
sbernauer f23562f
changelog
sbernauer d6986d2
docs: Add Kerberos discovery
sbernauer c635838
Apply suggestions from code review
sbernauer 8411d89
Update docs/modules/hbase/pages/usage-guide/security.adoc
sbernauer b911ab1
Update rust/crd/src/lib.rs
sbernauer d3e1719
refactor cli_role_name out
sbernauer afd8a22
Update tests/templates/kuttl/kerberos/42-test-rest-server.yaml
sbernauer 4d2bec4
Change port numbers according to Arch meeting decision
sbernauer cd979e4
Port unification
sbernauer 13d0e7b
fix test
sbernauer cd864fd
Update tests/templates/kuttl/kerberos/30-assert.yaml
sbernauer 9028cee
Fix file name
sbernauer befba73
refactor!: Align with HDFS CRD
sbernauer 2099493
fixup
sbernauer 8edc644
refactor: Move out ui_port_name
sbernauer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| = Security | ||
|
|
||
| == Authentication | ||
| Currently the only supported authentication mechanism is Kerberos, which is disabled by default. | ||
| For Kerberos to work a Kerberos KDC is needed, which the users need to provide. | ||
| The xref:home:secret-operator:secretclass.adoc#backend-kerberoskeytab[secret-operator documentation] states which kind of Kerberos servers are supported and how they can be configured. | ||
|
|
||
| === 1. Prepare Kerberos server | ||
| To configure HDFS to use Kerberos you first need to collect information about your Kerberos server, e.g. hostname and port. | ||
| Additionally, you need a service-user which the secret-operator uses to create principals for the HDFS services. | ||
|
|
||
| === 2. Create Kerberos SecretClass | ||
| Afterwards you need to enter all the needed information into a SecretClass, as described in xref:home:secret-operator:secretclass.adoc#backend-kerberoskeytab[secret-operator documentation]. | ||
| The following guide assumes you have named your SecretClass `kerberos`. | ||
|
|
||
| === 3. Configure HDFS to use SecretClass | ||
| The next step is to configure your HdfsCluster to use the newly created SecretClass. | ||
| Please follow the xref:hdfs:usage-guide/security.adoc[HDFS security guide] to set up and test this. | ||
| Please watch out to use the SecretClass named `kerberos`. | ||
|
|
||
| === 4. Configure HBase to use SecretClass | ||
| The last step is to configure the same SecretClass for HBase, which is done similar to HDFS. | ||
|
|
||
| IMPORTANT: HDFS and HBase need to use the same SecretClass (or at least use the same underlying Kerberos server). | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| spec: | ||
| clusterConfig: | ||
| authentication: | ||
| tlsSecretClass: tls # Optional, defaults to "tls" | ||
| kerberos: | ||
| secretClass: kerberos # Put your SecretClass name in here | ||
| ---- | ||
|
|
||
| The `kerberos.secretClass` is used to give HBase the possibility to request keytabs from the secret-operator. | ||
|
|
||
| The `tlsSecretClass` is needed to request TLS certificates, used e.g. for the Web UIs. | ||
|
|
||
| === 5. Verify that Kerberos authentication is required | ||
| Shell into the `hbase-master-default-0` Pod and execute the following commands: | ||
|
|
||
| 1. `kdestroy` (just in case you run `kinit` in the Pod already in the past) | ||
| 2. `echo 'list;' | bin/hbase shell` | ||
|
|
||
| The last command should fail with the error message `ERROR: Found no valid authentication method from options`. | ||
| You can also check the RestServer by calling `curl -v --insecure https://hbase-restserver-default:8081`, which should return `HTTP ERROR 401 Authentication required`. | ||
|
|
||
| === 6. Access HBase | ||
| In case you want to access your HBase it is recommended to start up a client Pod that connects to HBase, rather than shelling into the master. | ||
| We have an https://github.com/stackabletech/hbase-operator/blob/main/tests/templates/kuttl/kerberos/41-access-hbase.yaml.j2[integration test] for this exact purpose, where you can see how to connect and get a valid keytab. | ||
|
|
||
| == Authorization | ||
| Together with Kerberos authorization is enabled. | ||
| You need to explicitly grant table permissions to all users. | ||
| E.g. the integration tests run `grant 'testuser', 'C';` to grant the testuser the permission to create tables. | ||
|
|
||
| == Wire encryption | ||
| In case Kerberos is enabled, `Privacy` mode is used for best security. | ||
| Wire encryption without Kerberos as well as other wire encryption modes are *not* supported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.