Use authentication and add example

This commit is contained in:
Manuel de Brito Fontes 2016-05-11 02:22:17 -03:00
parent 8fd6ec61fe
commit 221b823ca7
5 changed files with 284 additions and 56 deletions

View file

@ -213,6 +213,29 @@ This means only one of the rules should define annotations to configure the upst
Please check the [auth](examples/custom-upstream-check/README.md) example
### Authentication
Is possible to add authentication adding additional annotations in the Ingress rule. The source of the authentication is a secret that contains usernames and passwords inside the the key `auth`
The annotations are:
```
ingress-nginx.kubernetes.io/auth-type:[basic|digest]
```
Indicates the [HTTP Authentication Type: Basic or Digest Access Authentication](https://tools.ietf.org/html/rfc2617).
```
ingress-nginx.kubernetes.io/auth-secret:secretName
```
Name of the secret that contains the usernames and passwords with access to the `path/s` defined in the Ingress Rule.
The secret must be created in the same namespace than the Ingress rule
```
ingress-nginx.kubernetes.io/auth-realm:"realm string"
```
### NGINX status page