morbidick.ansible-role-oauth2-proxy
OAuth2-proxy Ansible Role
This is an Ansible role that helps you install and set up oauth2 proxy.
Variables
oauth2_proxy_version : "v7.1.3"
oauth2_user : "oauth2"
oauth2_dir : "/opt/oauth2_proxy"
oauth2_tmp_dir : "/opt/oauth2_proxy/tmp"
oauth2_log_dir : "/var/log/oauth2-proxy/"
oauth2_config_path : "/etc/oauth2_proxy/oauth2_config.cfg"
oauth2_init_system : "systemd" # can be `systemd`, `sysv`, or `no` if you don't want to set it up
# Check all options at https://raw.githubusercontent.com/pusher/oauth2_proxy/master/contrib/oauth2_proxy.cfg.example
oauth2_proxy_config :
http_address : "127.0.0.1:5000"
upstreams : [ "127.0.0.1:6060" ]
provider : "github"
email_domains : "*"
cookie_secure : false
cookie_domain : "localhost:5000"
cookie_secret : "{{ 'COOK_SECRET' | b64encode }}"
client_id : "YOUR_CLIENT_ID"
client_secret : "CLIENT_SECRET"
oauth2_config_cmdline_args : "-github-org='MYCoolOrg'"
Development
You can use the Vagrantfile for local testing. Just install Vagrant and VirtualBox, then run the following commands:
vagrant up
vagrant provision
To test the OAuth2 process with Github, create a new OAuth application in your GitHub profile with the homepage set to http://127.0.0.1:5000
and the callback URL set to http://127.0.0.1:5000/oauth2/callback
. Make sure to replace client_id
and client_secret
in tests/role.yml with the GitHub tokens you received. You can then open your browser and go to 127.0.0.1:5000.
License
MIT
Installa
ansible-galaxy install morbidick.ansible-role-oauth2-proxy
Licenza
mit
Download
2k
Proprietario
mostly web dev, freelancer with @madways