微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sohop OAuth 认证反向代理

程序名称:sohop

授权协议: ISC

操作系统: 跨平台

开发语言: Google Go

sohop 介绍

sohop 是一个反向代理,可以选择性地限制对使用 OAuth 进行身份验证的用户的访问权限。它还提供一个运行状况检查端点,用于报告上游服务的可达性。

sohop 可以在保持限制访问的情况下,公开原有的内部应用到公共互联网,而不必在应用本身配置认证/授权。

Usage of sohop:
  -config string
        Config file (default "config.json")
  -httpAddr string
        Address to bind HTTP server (default ":80")
  -httpsAddr string
        Address to bind HTTPS server (default ":443")
{
  "Domain": "example.com",
  "Cookie": {
    "Name": "exampleauth",
    "Secret": "3c0767ada2466a92a59c1214061441713aeafe6d115e29aa376c0f9758cdf0f5"
  },  
  "Auth" : {
    "Type": "github-org",
    "Config": {
      "ClientID": "12345678",
      "ClientSecret": "12345678",
      "OrgID": 12345678
    }
  },
  "TLS": {
    "CertFile": "cert.pem",
    "CertKey": "key.pem"
  },
  "Upstreams": {
    "intranet": {
      "URL": "http://10.0.0.16:8888",
      "HealthCheck": "http://10.0.0.16:8888/login",
      "WebSocket": "ws://10.0.0.16:8888",
      "Auth": true,
      "Headers": { "X-WEBAUTH-USER":["{{.Session.Values.user}}"] }
    },
    "public": {
      "URL": "http://10.0.0.16:8111",
      "HealthCheck": "http://10.0.0.16:8111/login.html",
      "WebSocket": "ws://10.0.0.16:8111",
      "Auth": false
    }
  }
}


{
  "Domain": "example.com",    
  "Auth" : {
    "Type": "gmail-regex",
    "Config": {
      "Credentials": {"web":{"client_id":"XXXX-yyyyyy.apps.googleusercontent.com","project_id":"example","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"zzzzZZzzZZ","redirect_uris":["https://oauth.example.com/authorized"]}},
      "EmailRegex":"^davars@gmail.com$"
    }
  },
  "Upstreams": {

...

  }
}

sohop 官网

https://github.com/davars/sohop

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐