Categorygithub.com/oidc-proxy-ecosystem/oidc-proxy
modulepackage
0.0.1
Repository: https://github.com/oidc-proxy-ecosystem/oidc-proxy.git
Documentation: pkg.go.dev

# README

oidc-proxy

概要

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

認証方式

OAuth2: Authorization Code Flowに基づくOpenID Connect

Contents

application config file

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

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

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

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

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

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

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

TopLevel

キータイプ内容required
portnumberプロキシサーバーのポート番号true
ssl_certificatestring.crtファイルfalse
ssl_certificate_keystring.keyファイルfalse
loggingobjectLoggingtrue
serversarrayServerstrue

Logging

キータイプ内容required
levelstringログの出力レベルが設定出来ます。(debug, info, warn, error, criticalのどれかを設定)true
filenamestring出力先ファイル名を設定(絶対パス)false
prefixstringログ出力時にprefixが設定されるfalse

servers

キータイプ内容required
session_namestringcookieセッション名true
server_namestringバーチャルホスト名true
loginstringプロキシサーバー上のログインURLを設定true
callbackstringプロキシサーバー上のコールバックURLtrue
logoutstringプロキシサーバー上のログアウトURLtrue
loggingobjectLoggingtrue
oidcobjectOIDCtrue
locationsarrayLocationtrue
loggingobjectLoggingtrue
cacheobjectCachetrue

oidc

キータイプ内容required
scopesarrayoidcスコープtrue
providerstringプロバイダURLtrue
client_idstringIDPクライアントキーtrue
client_secretstringIDPクライアントシークレットキーtrue
redirect_urlstringリダイレクトURLtrue
logoutstringIDPのログアウト先URLtrue

location

キータイプ内容required
proxy_passstring転送先URLtrue
urlsarrayURLtrue

urls

キータイプ内容required
pathstring転送先URLパスtrue
tokenstring転送先パスへ転送するトークンを設定(id_token, access_token)true

cache

キータイプ内容required
namestring使用するキャッシュプラグイン名true
codecsarrayCookieセッションを暗号化するためのキー文字列true
cache_timenumberキャッシュを保持しておく時間true
endpointsarrayキャッシュサーバーへの接続先エンドポイントtrue(etcd)
usernamestringキャッシュサーバーへの接続ユーザー名false
passwordstringキャッシュサーバーへの接続パスワード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
        codecs: []
        endpoints: []
        cache_time: 30
        username: ""
        password: ""

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author