Skip to content

[ZEPPELIN-3741] Do not clear "Authorization" header if Z-server is running behind proxy#3155

Closed
prabhjyotsingh wants to merge 3 commits intoapache:masterfrom
prabhjyotsingh:ZEPPELIN-3741
Closed

[ZEPPELIN-3741] Do not clear "Authorization" header if Z-server is running behind proxy#3155
prabhjyotsingh wants to merge 3 commits intoapache:masterfrom
prabhjyotsingh:ZEPPELIN-3741

Conversation

@prabhjyotsingh
Copy link
Contributor

@prabhjyotsingh prabhjyotsingh commented Aug 21, 2018

What is this PR for?

There can be a case where Zeppelin-Sever is running as Form-Based-Authentication, however, it can be running behind a proxy which may be requiring Authorization header.
The idea of this PR is to not clear that header when it behind a proxy and control it with config.

What type of PR is it?

[Bug Fix]

Todos

  • - Add documentaion

What is the Jira issue?

How should this be tested?

  • Configure Nginx to run with auth_basic option
  • Start Zeppelin server behind a proxy server like Nginx
  • Make sure that shiro.ini is configured to run with /** = authc
  • In zeppelin-site.xml configure zeppelin.server.authorization.header.clear as false
    Now on logout from Zeppelin-Server should not clear Authorization header of Nginx

Questions:

  • Does the licenses files need update? N/A
  • Is there breaking changes for older versions? N/A
  • Does this needs documentation? Yes

@prabhjyotsingh prabhjyotsingh force-pushed the ZEPPELIN-3741 branch 2 times, most recently from 5597440 to 792c518 Compare August 21, 2018 09:59
@prabhjyotsingh
Copy link
Contributor Author

@zjffdu @felixcheung @r-kamath can you help review this.

I've tested this on latest versions of Chrome (Mac), Firefox (Mac), Edge (Windows 10).

…ning behind proxy

Change-Id: I6ff2e58026dd744821e9c5ccaf8fd0658cf610bd
ZEPPELIN_SERVER_XFRAME_OPTIONS("zeppelin.server.xframe.options", "SAMEORIGIN"),
ZEPPELIN_SERVER_JETTY_NAME("zeppelin.server.jetty.name", null),
ZEPPELIN_SERVER_JETTY_REQUEST_HEADER_SIZE("zeppelin.server.jetty.request.header.size", 8192),
ZEPPELIN_SERVER_CLEAR_AUTHORIZATION_HEADER("zeppelin.server.clear.authorization.header", true),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to be named as zeppelin.server.authorization.header.clear

Change-Id: Ibf5694fc6700687e348b6d6fb68784da4eb3fc69
Change-Id: Ia5d234286f45369c05dbeb1384312189f934b5ea
@prabhjyotsingh
Copy link
Contributor Author

Will merge this to master if no more discussion.

@asfgit asfgit closed this in 3047bc2 Aug 22, 2018
prabhjyotsingh added a commit to prabhjyotsingh/zeppelin that referenced this pull request Apr 29, 2019
…server is running behind proxy

There can be a case where Zeppelin-Sever is running as Form-Based-Authentication, however, it can be running behind a proxy which may be requiring Authorization header.
The idea of this PR is to not clear that header when it behind a proxy and control it with config.

[Bug Fix]

* [x] - Add documentaion

* [ZEPPELIN-3741](https://issues.apache.org/jira/browse/ZEPPELIN-3741)

* Configure Nginx to run with `auth_basic` option
* Start Zeppelin server behind a proxy server like Nginx
* Make sure that `shiro.ini` is configured to run with `/** = authc`
* In `zeppelin-site.xml` configure `zeppelin.server.authorization.header.clear` as `false`
Now on logout from Zeppelin-Server should not clear *Authorization* header of Nginx

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? Yes

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes apache#3155 from prabhjyotsingh/ZEPPELIN-3741 and squashes the following commits:

d95fc32 [Prabhjyot Singh] add documentation
54daaca [Prabhjyot Singh] rename variable to "zeppelin.server.authorization.header.clear"
832ef04 [Prabhjyot Singh] ZEPPELIN-3741: Do not clear "Authorization" header if Z-server is running behind proxy

Change-Id: I8c504e170b576570dbb888160946a2c477d7928e
prabhjyotsingh added a commit to prabhjyotsingh/zeppelin that referenced this pull request Sep 5, 2019
…server is running behind proxy

There can be a case where Zeppelin-Sever is running as Form-Based-Authentication, however, it can be running behind a proxy which may be requiring Authorization header.
The idea of this PR is to not clear that header when it behind a proxy and control it with config.

[Bug Fix]

* [x] - Add documentaion

* [ZEPPELIN-3741](https://issues.apache.org/jira/browse/ZEPPELIN-3741)

* Configure Nginx to run with `auth_basic` option
* Start Zeppelin server behind a proxy server like Nginx
* Make sure that `shiro.ini` is configured to run with `/** = authc`
* In `zeppelin-site.xml` configure `zeppelin.server.authorization.header.clear` as `false`
Now on logout from Zeppelin-Server should not clear *Authorization* header of Nginx

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? Yes

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes apache#3155 from prabhjyotsingh/ZEPPELIN-3741 and squashes the following commits:

d95fc32 [Prabhjyot Singh] add documentation
54daaca [Prabhjyot Singh] rename variable to "zeppelin.server.authorization.header.clear"
832ef04 [Prabhjyot Singh] ZEPPELIN-3741: Do not clear "Authorization" header if Z-server is running behind proxy

Change-Id: I8c504e170b576570dbb888160946a2c477d7928e

# Conflicts:
#	HDP-CHANGES.txt
prabhjyotsingh added a commit to prabhjyotsingh/zeppelin that referenced this pull request Mar 2, 2022
…server is running behind proxy

There can be a case where Zeppelin-Sever is running as Form-Based-Authentication, however, it can be running behind a proxy which may be requiring Authorization header.
The idea of this PR is to not clear that header when it behind a proxy and control it with config.

[Bug Fix]

* [x] - Add documentaion

* [ZEPPELIN-3741](https://issues.apache.org/jira/browse/ZEPPELIN-3741)

* Configure Nginx to run with `auth_basic` option
* Start Zeppelin server behind a proxy server like Nginx
* Make sure that `shiro.ini` is configured to run with `/** = authc`
* In `zeppelin-site.xml` configure `zeppelin.server.authorization.header.clear` as `false`
Now on logout from Zeppelin-Server should not clear *Authorization* header of Nginx

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? Yes

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes apache#3155 from prabhjyotsingh/ZEPPELIN-3741 and squashes the following commits:

d95fc32 [Prabhjyot Singh] add documentation
54daaca [Prabhjyot Singh] rename variable to "zeppelin.server.authorization.header.clear"
832ef04 [Prabhjyot Singh] ZEPPELIN-3741: Do not clear "Authorization" header if Z-server is running behind proxy

Change-Id: I8c504e170b576570dbb888160946a2c477d7928e

# Conflicts:
#	HDP-CHANGES.txt
@prabhjyotsingh prabhjyotsingh deleted the ZEPPELIN-3741 branch May 2, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants