OAuth2-Proxy Setup

This doc is about OAuth2-proxy Setup



Oauth2-proxy Setup

  • Clone the following DIGIT-DevOps repo (If not already done as part of Infra setup), you may need to install git and then run git clone on your machine.

    git clone -b release https://github.com/egovernments/DIGIT-DevOps

  • Add below configs into your environment file

    configFile: |-
      email_domains = [ "*" ]
      github_org = "<github_org>"                     # Repalce with GitHub org name
      github_team = "<github_team>,<github_team>"     # Repalce with GitHub teams
      upstreams = [ "file:///dev/null" ]
  • Create a GitHub OAuth app and add the below secrets into the environment secrets file

    • GitHub OAuth App Creation

      • Follow the GitHub OAuth app

      • Homepage URL:- mentions your domain name eg. https://<your_domain_name>

      • Authorization callback URL:- https://<your_domain_name>/oauth2/callback

oauth2-proxy:   ## To work oauth2-proxy service, create and add your github OAuth Apps details
    clientID: qwgethjymnbv  
    clientSecret: 3a08079easd95696fd3baad5292
    cookieSecret: QVbnq0L96wtBg==   ## Any random hash value
  • Deploy the oauth2-proxy via Jenkins deployment job or go land deployer

    cd DIGIT-DevOps/deploy-as-code/deployer
    go run main.go deploy -e <environment_name> 'oauth2-proxy'

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.