Ci-dessous, les différences entre deux révisions de la page.
Both sides previous revision Révision précédente | Prochaine révision Both sides next revision | ||
si:oauth2proxy [2021/02/21 17:03] dino |
si:oauth2proxy [2021/02/21 17:07] dino |
||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
</code> | </code> | ||
- | création du service | + | création du fichier de conf dans /opt/keycloak.cfg |
+ | <code> | ||
+ | provider = "oidc" | ||
+ | redirect_url = "https://transfert-images.parinux.org/oauth2/callback" | ||
+ | oidc_issuer_url = "https://sso.parinux.org/auth/realms/master" | ||
+ | upstreams = [ | ||
+ | "https://transfert-images.parinux.org" | ||
+ | ] | ||
+ | email_domains = [ | ||
+ | "*" | ||
+ | ] | ||
+ | client_id = "IDKeycloakduclient" | ||
+ | client_secret = "secretdukeycloakpourceclient" | ||
+ | pass_access_token = true | ||
+ | cookie_secret = "uncookiede32caractéres" | ||
+ | skip_provider_button = true | ||
+ | </code> | ||
+ | |||
+ | |||
+ | Tester votre fichier de conf | ||
+ | <code> | ||
+ | /opt/oauth2-proxy/oauth2-proxy --config=/opt/keycloak.cfg | ||
+ | </code/ | ||
+ | corriger les soucis | ||
+ | |||
+ | ====== création du service ====== | ||
Création du fichier /etc/systemd/system/oauth2-proxy.service | Création du fichier /etc/systemd/system/oauth2-proxy.service | ||
Ligne 35: | Ligne 61: | ||
ExecStart=/opt/oauth2-proxy/oauth2-proxy --config=/opt/keycloak.cfg --http-address=0.0.0.0:4180 | ExecStart=/opt/oauth2-proxy/oauth2-proxy --config=/opt/keycloak.cfg --http-address=0.0.0.0:4180 | ||
</code> | </code> | ||
+ | |||
le mettre en exécutable, permettre son lancement, son état et le lancer | le mettre en exécutable, permettre son lancement, son état et le lancer | ||
Ligne 45: | Ligne 72: | ||
+ | doc | ||
+ | https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview/#config-file | ||
+ | https://devopsloggers.com/2020/05/30/oauth2_proxy-google-authentication-using-nginx-on-ubuntu-18-04/ | ||