You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/security/authentication.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,42 +34,43 @@ This instruction based on Ubuntu 14.04 LTS but may work with other OS with few c
34
34
35
35
1. Install NGINX server on your server instance
36
36
37
-
You can install NGINX server with same machine where zeppelin installed or separate machine where it is dedicated to serve as proxy server.
37
+
You can install NGINX server with same box where zeppelin installed or separate box where it is dedicated to serve as proxy server.
38
38
39
39
```
40
40
$ apt-get install nginx
41
41
```
42
+
*Important: On pre 1.3.13 version of NGINX, Proxy for Websocket may not fully works. Please use latest version of NGINX. See: [NGINX documentation](https://www.nginx.com/blog/websocket-nginx/)*
42
43
43
44
1. Setup init script in NGINX
44
45
45
46
In most cases, NGINX configuration located under `/etc/nginx/sites-available`. Create your own configuration or add your existing configuration at `/etc/nginx/sites-available`.
46
47
47
48
```
48
49
$ cd /etc/nginx/sites-available
49
-
$ touch my-basic-auth
50
+
$ touch my-zeppelin-auth-setting
50
51
```
51
52
52
-
Now add this script into `my-basic-auth` file. You can comment out `optional` lines If you want serve Zeppelin under regular HTTP 80 Port.
53
+
Now add this script into `my-zeppelin-auth-setting` file. You can comment out `optional` lines If you want serve Zeppelin under regular HTTP 80 Port.
53
54
54
55
```
55
56
upstream zeppelin {
56
-
server [YOUR-ZEPPELIN-SERVER-IP]:8080;
57
+
server [YOUR-ZEPPELIN-SERVER-IP]:[YOUR-ZEPPELIN-SERVER-PORT]; # For security, It is highly recommended to make this address/port as non-public accessible
57
58
}
58
59
59
60
# Zeppelin Website
60
61
server {
61
62
listen [YOUR-ZEPPELIN-WEB-SERVER-PORT];
62
-
listen 443 ssl; # optional, to serve HTTPS connection
63
-
server_name [YOUR-ZEPPELIN-SERVER-HOST]; # for example: zeppelin.mycompany.com
63
+
listen 443 ssl; # optional, to serve HTTPS connection
64
+
server_name [YOUR-ZEPPELIN-SERVER-HOST]; # for example: zeppelin.mycompany.com
64
65
65
66
ssl_certificate [PATH-TO-YOUR-CERT-FILE]; # optional, to serve HTTPS connection
66
67
ssl_certificate_key [PATH-TO-YOUR-CERT-KEY-FILE]; # optional, to serve HTTPS connection
67
68
68
69
if ($ssl_protocol = "") {
69
-
rewrite ^ https://$host$request_uri? permanent; # optional, force to use HTTPS
70
+
rewrite ^ https://$host$request_uri? permanent; # optional, to force use of HTTPS
1. Setup user credential into `.htpasswd` file and restart server
@@ -102,11 +103,11 @@ This instruction based on Ubuntu 14.04 LTS but may work with other OS with few c
102
103
103
104
```
104
105
$ cd /etc/nginx
105
-
$ htpasswd -c htpasswd [YOUR_ID]
106
-
$ NEW passwd: [YOUR_PASSWORD]
107
-
$ RE-type new passwd: [YOUR_PASSWORD_AGAIN]
106
+
$ htpasswd -c htpasswd [YOUR-ID]
107
+
$ NEW passwd: [YOUR-PASSWORD]
108
+
$ RE-type new passwd: [YOUR-PASSWORD-AGAIN]
108
109
```
109
-
Or you can use your own apache `.htpasswd` files in other location by setup property `auth_basic_user_file`
110
+
Or you can use your own apache `.htpasswd` files in other location for setting up property: `auth_basic_user_file`
110
111
111
112
Restart NGINX server.
112
113
@@ -115,9 +116,6 @@ This instruction based on Ubuntu 14.04 LTS but may work with other OS with few c
115
116
```
116
117
Then check HTTP Basic Authentication works in browser. If you can see regular basic auth popup and then able to login with credential you entered into `.htpasswd` you are good to go.
* Using HTTPS connection with Basic Authentication is highly recommended since basic auth without encryption may expose your important credential information over the network.
0 commit comments