admin: Generate Vouch-Proxy config
This commit is contained in:
parent
59af4103b8
commit
5974fe8cd4
@ -280,15 +280,15 @@ vouch:
|
||||
document_root: /challenge_access
|
||||
|
||||
cookie:
|
||||
domain: {{ .Issuer }}
|
||||
domain: {{ .Domain }}
|
||||
|
||||
oauth:
|
||||
oauth:
|
||||
provider: oidc
|
||||
client_id: {{ .ClientId }}
|
||||
client_secret: {{ .ClientSecret }}
|
||||
callback_urls:
|
||||
- https://{{ .Issuer }}/challenge_access/auth
|
||||
auth_url: https://{{ .Issuer }}/auth
|
||||
- https://{{ .Domain }}/challenge_access/auth
|
||||
auth_url: https://{{ .Domain }}/auth
|
||||
token_url: http://127.0.0.1:5556/token
|
||||
user_info_url: http://127.0.0.1:5556/userinfo
|
||||
scopes:
|
||||
@ -297,7 +297,7 @@ vouch:
|
||||
`
|
||||
|
||||
type vouchProxyConfig struct {
|
||||
Issuer string
|
||||
Domain string
|
||||
ClientId string
|
||||
ClientSecret string
|
||||
}
|
||||
@ -312,7 +312,7 @@ func genVouchProxyConfig() ([]byte, error) {
|
||||
if vouchTmpl, err := template.New("vouchcfg").Parse(vouchcfgtpl); err != nil {
|
||||
return nil, fmt.Errorf("Cannot create template: %w", err)
|
||||
} else if err = vouchTmpl.Execute(b, vouchProxyConfig{
|
||||
Issuer: "https://" + OidcIssuer,
|
||||
Domain: OidcIssuer,
|
||||
ClientId: OidcClientId,
|
||||
ClientSecret: OidcSecret,
|
||||
}); err != nil {
|
||||
|
@ -2396,12 +2396,11 @@ angular.module("FICApp")
|
||||
}, function(response) {
|
||||
$scope.addToast('danger', 'An error occurs when generating dex config:', response.data.errmsg);
|
||||
});
|
||||
$http.post("api/vouch.yaml").then(function() {
|
||||
$http.post("api/vouch-proxy.yaml").then(function() {
|
||||
$scope.addToast('success', 'VouchProxy config refreshed.', "Don't forget to reload/reboot frontend host.");
|
||||
}, function(response) {
|
||||
$scope.addToast('danger', 'An error occurs when generating VouchProxy config:', response.data.errmsg);
|
||||
});
|
||||
});
|
||||
}
|
||||
$scope.desactiveTeams = function() {
|
||||
$http.post("api/disableinactiveteams").then(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user