LoginSignup
1
0

More than 3 years have passed since last update.

oauth2-proxyでメールアドレス認証する

Posted at

目的

特定のメールアドレスのみ、認証を通したい。

環境

Docker

方法

--authenticated-emails-file オプションを使用する。

以下docker-compose.ymlサンプル(一部抜粋)

docker-compose.yml
  oauth2-proxy:
    image: quay.io/oauth2-proxy/oauth2-proxy:latest
    container_name: oauth2-proxy
    command: >
      '--http-address=0.0.0.0:4180'
      '--cookie-secure=true'
      '--cookie-expire=24h'
      '--cookie-httponly=true'
      '--cookie-domain=************'
      '--cookie-name=************'
      '--cookie-secret=**********'
      '--upstream=http://******:5601'
      '--authenticated-emails-file=/usr/local/allowemails'
      '--client-id=*************.apps.googleusercontent.com'
      '--client-secret=************'
    volumes:
      - ./oauth2-proxy/allowemails:/usr/local/allowemails
outh2-proxy/allowemails
youremail@gmail.com
heremail@gmail.com
hisemail@gmail.com

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0