oidc-proxy

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2021 License: MIT Imports: 3 Imported by: 0

README

oidc-proxy

概要

OpenID Connectへ認証を行い、プロキシ先へAuthorizationヘッダーにBearerトークンを付与してプロキシ転送を行う。

認証方式

OAuth2: Authorization Code Flowに基づくOpenID Connect

Contents

application config file

サポートしているファイル拡張子

  • .yaml
  • .yml
  • .toml
  • .json

設定ファイル内に環境変数を設定することも可能です。

設定ファイルについてはファイル監視を行い、変更が入り次第設定を読込

ルーティング設定等々の再設定が行われます。

ssl証明書ファイルに関しても、ファイル監視を行っているため

再起動なしで再設定が可能です。

TopLevel
キー タイプ 内容 required
port number プロキシサーバーのポート番号 true
ssl_certificate string .crtファイル false
ssl_certificate_key string .keyファイル false
logging object Logging true
servers array Servers true
Logging
キー タイプ 内容 required
level string ログの出力レベルが設定出来ます。(debug, info, warn, error, criticalのどれかを設定) true
filename string 出力先ファイル名を設定(絶対パス) false
prefix string ログ出力時にprefixが設定される false
servers
キー タイプ 内容 required
session_name string cookieセッション名 true
server_name string バーチャルホスト名 true
login string プロキシサーバー上のログインURLを設定 true
callback string プロキシサーバー上のコールバックURL true
logout string プロキシサーバー上のログアウトURL true
logging object Logging true
oidc object OIDC true
locations array Location true
logging object Logging true
cache object Cache true
oidc
キー タイプ 内容 required
scopes array oidcスコープ true
provider string プロバイダURL true
client_id string IDPクライアントキー true
client_secret string IDPクライアントシークレットキー true
redirect_url string リダイレクトURL true
logout string IDPのログアウト先URL true
location
キー タイプ 内容 required
proxy_pass string 転送先URL true
urls array URL true
urls
キー タイプ 内容 required
path string 転送先URLパス true
token string 転送先パスへ転送するトークンを設定(id_token, access_token) true
cache
キー タイプ 内容 required
name string 使用するcache名(memory or etcd) true
codecs array セッションを暗号化するためのキー文字列 true
endpoints array キャッシュサーバーへの接続先エンドポイント true(etcd)
cache_time number キャッシュを保持しておく時間 true
username string キャッシュサーバーへの接続ユーザー名 false
password string キャッシュサーバーへの接続パスワード false
example
port: 8080
ssl_certificate: ssl/sever.crt
ssl_certificate_key: ssl/sever.key
logging:
    level: debug or info or warn or warning(warn) or error or err(error) or critical or dev(debug) or prod(info)
    filename: ""
    prefix: ""
servers:
    - oidc:
        scopes:
            - email
            - openid
            - offline_access
            - profile
        provider: https://keycloak/
        client_id: xxx
        client_secret: xxx
        redirect_url: http://localhost:8080/oauth2/callback
        logout: https://keycloak/logout?returnTo=http://localhost:8080/oauth2/login
      login: /oauth2/login
      callback: /oauth2/callback
      logout: /oauth2/logout
      locations:
        - proxy_pass: http://localhost
          urls:
            - path: /
              token: id_token
      logging:
        level: debug or info or warn or warning(warn) or error or err(error) or critical or dev(debug) or prod(info)
        filename: ""
        prefix: ""
      session_name: ""
      server_name: virtual sever name
      cache:
        name: memory or etcd
        codecs: []
        endpoints: []
        cache_time: 30
        username: ""
        password: ""

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
examples
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL