-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-3821. Disable Ozone SPNEGO should not fall back to hadoop.http.a… #1101
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,12 +100,12 @@ All these settings should be made in ozone-site.xml. | |
| <td>The keytab file used by SCM daemon to login as its service principal.</td> | ||
| </tr> | ||
| <tr> | ||
| <td>hdds.scm.http.kerberos.principal</th> | ||
| <td>SCM http server service principal.</td> | ||
| <td>hdds.scm.http.auth.kerberos.principal</th> | ||
| <td>SCM http server service principal if SPNEGO is enabled for SCM http server.</td> | ||
| </tr> | ||
| <tr> | ||
| <td>hdds.scm.http.kerberos.keytab</th> | ||
| <td>The keytab file used by SCM http server to login as its service principal.</td> | ||
| <td>hdds.scm.http.auth.kerberos.keytab</th> | ||
| <td>The keytab file used by SCM http server to login as its service principal if SPNEGO is enabled for SCM http server</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
@@ -136,12 +136,12 @@ All these settings should be made in ozone-site.xml. | |
| <td>TThe keytab file used by SCM daemon to login as its service principal.</td> | ||
| </tr> | ||
| <tr> | ||
| <td>ozone.om.http.kerberos.principal</th> | ||
| <td>Ozone Manager http server service principal.</td> | ||
| <td>ozone.om.http.auth.kerberos.principal</th> | ||
| <td>Ozone Manager http server service principal if SPNEGO is enabled for om http server.</td> | ||
| </tr> | ||
| <tr> | ||
| <td>ozone.om.http.kerberos.keytab</th> | ||
| <td>The keytab file used by OM http server to login as its service principal.</td> | ||
| <td>ozone.om.http.auth.kerberos.keytab</th> | ||
| <td>The keytab file used by OM http server to login as its service principal if SPNEGO is enabled for om http server.</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
@@ -165,11 +165,11 @@ All these settings should be made in ozone-site.xml. | |
| <tbody> | ||
| <tr> | ||
| <td>ozone.s3g.http.auth.kerberos.principal</th> | ||
| <td>S3 Gateway principal. <br/> e.g. HTTP/[email protected]</td> | ||
| <td>S3 Gateway principal if SPNEGO is enabled for S3 Gateway http server. <br/> e.g. HTTP/[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>ozone.s3g.http.auth.kerberos.keytab</th> | ||
| <td>The keytab file used by S3 gateway</td> | ||
| <td>The keytab file used by S3 gateway if SPNEGO is enabled for S3 Gateway http server.</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
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,141 @@ | ||
| --- | ||
| title: "Securing Ozone HTTP web-consoles" | ||
| date: "2020-June-17" | ||
| summary: Secure HTTP web-consoles for Ozone services | ||
| weight: 3 | ||
| icon: lock | ||
| --- | ||
| <!--- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
|
|
||
| This document describes how to configure Ozone HTTP web-consoles to require user authentication. | ||
|
|
||
| ### Default authentication | ||
|
|
||
| By default Ozone HTTP web-consoles (OM, SCM, S3G, Recon, Datanode) | ||
| allow access without authentication based on the following default configurations. | ||
|
|
||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.security.http.kerberos.enabled | false | ||
| ozone.http.filter.initializers | <empty> | ||
|
|
||
| If you have an SPNEGO enabled Ozone cluster and want to disable it for all Ozone services, | ||
| just make sure the two key mentioned are configured as above. | ||
|
|
||
| ### Kerberos based SPNEGO authentication | ||
| However, they can be configured to require Kerberos authentication using HTTP SPNEGO protocol (supported | ||
| by browsers like Firefox and Chrome). To achieve that, the following keys must | ||
| be configured first. | ||
|
|
||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| hadoop.security.authentication | kerberos | ||
| ozone.security.http.kerberos.enabled | true | ||
| ozone.http.filter.initializers | org.apache.hadoop.security.AuthenticationFilterInitializer | ||
|
|
||
| After that, individual component needs to configure properly to completely enable | ||
| SPNEGO or SIMPLE authentication. | ||
|
|
||
| ### Enable SPNEGO authentication for OM HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.om.http.auth.type | kerberos | ||
| ozone.om.http.auth.kerberos.principal | HTTP/_HOST@REALM | ||
| ozone.om.http.auth.kerberos.keytab| /path/to/HTTP.keytab | ||
|
|
||
| ### Enable SPNEGO authentication for S3G HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.s3g.http.auth.type | kerberos | ||
| ozone.s3g.http.auth.kerberos.principal | HTTP/_HOST@REALM | ||
| ozone.s3g.http.auth.kerberos.keytab| /path/to/HTTP.keytab | ||
|
|
||
| ### Enable SPNEGO authentication for RECON HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.recon.http.auth.type | kerberos | ||
| ozone.recon.http.auth.kerberos.principal | HTTP/_HOST@REALM | ||
| ozone.recon.http.auth.kerberos.keytab| /path/to/HTTP.keytab | ||
|
|
||
| ### Enable SPNEGO authentication for SCM HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| hdds.scm.http.auth.type | kerberos | ||
| hdds.scm.http.auth.kerberos.principal | HTTP/_HOST@REALM | ||
| hdds.scm.http.auth.kerberos.keytab| /path/to/HTTP.keytab | ||
|
|
||
| ### Enable SPNEGO authentication for DATANODE HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| hdds.datanode.http.auth.type | kerberos | ||
| hdds.datanode.http.auth.kerberos.principal | HTTP/_HOST@REALM | ||
| hdds.datanode.http.auth.kerberos.keytab| /path/to/HTTP.keytab | ||
|
|
||
| Note: Ozone datanode does not have a default webpage, which prevents you from | ||
| accessing "/" or "/index.html". But it does provide standard | ||
| servlet like jmx/conf/jstack via HTTP. | ||
|
|
||
| In addition, Ozone HTTP web-console support the equivalent of Hadoop's Pseudo/Simple authentication. | ||
| If this option is enabled, the user name must be specified in the first browser interaction using the user.name | ||
| query string parameter. e.g., http://scm:9876/?user.name=scmadmin. | ||
|
|
||
| ### Enable SIMPLE authentication for OM HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.om.http.auth.type | simple | ||
| ozone.om.http.auth.simple.anonymous_allowed | false | ||
|
|
||
| If you don't want to specify the user.name in the query string parameter, | ||
| change ozone.om.http.auth.simple.anonymous_allowed to true. | ||
|
|
||
| ### Enable SIMPLE authentication for S3G HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.s3g.http.auth.type | simple | ||
| ozone.s3g.http.auth.simple.anonymous_allowed | false | ||
|
|
||
| If you don't want to specify the user.name in the query string parameter, | ||
| change ozone.s3g.http.auth.simple.anonymous_allowed to true. | ||
|
|
||
| ### Enable SIMPLE authentication for RECON HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.recon.http.auth.type | simple | ||
| ozone.recon.http.auth.simple.anonymous_allowed | false | ||
|
|
||
| If you don't want to specify the user.name in the query string parameter, | ||
| change ozone.recon.http.auth.simple.anonymous_allowed to true. | ||
|
|
||
|
|
||
| ### Enable SIMPLE authentication for SCM HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.scm.http.auth.type | simple | ||
| ozone.scm.http.auth.simple.anonymous_allowed | false | ||
|
|
||
| If you don't want to specify the user.name in the query string parameter, | ||
| change ozone.scm.http.auth.simple.anonymous_allowed to true. | ||
|
|
||
| ### Enable SIMPLE authentication for DATANODE HTTP | ||
| Property| Value | ||
| -----------------------------------|----------------------------------------- | ||
| ozone.datanode.http.auth.type | simple | ||
| ozone.datanode.http.auth.simple.anonymous_allowed | false | ||
|
|
||
| If you don't want to specify the user.name in the query string parameter, | ||
| change ozone.datanode.http.auth.simple.anonymous_allowed to true. |
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
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.
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.
Hi @xiaoyuyao,
Were these Ratis log levels intentionally set to DEBUG in the final commit, or is it a leftover that should have been removed?