mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-31 23:41:09 +02:00
authorize: remove admin (#1833)
* authorize: remove admin * regen rego * add note to upgrading
This commit is contained in:
parent
a5a3ab55fc
commit
b7f0242090
17 changed files with 204 additions and 381 deletions
|
@ -26,8 +26,6 @@ import (
|
|||
|
||||
type authenticateState struct {
|
||||
redirectURL *url.URL
|
||||
// administrators keeps track of administrator users.
|
||||
administrators map[string]struct{}
|
||||
// sharedEncoder is the encoder to use to serialize data to be consumed
|
||||
// by other services
|
||||
sharedEncoder encoding.MarshalUnmarshaler
|
||||
|
@ -55,8 +53,7 @@ type authenticateState struct {
|
|||
|
||||
func newAuthenticateState() *authenticateState {
|
||||
return &authenticateState{
|
||||
administrators: map[string]struct{}{},
|
||||
jwk: new(jose.JSONWebKeySet),
|
||||
jwk: new(jose.JSONWebKeySet),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,11 +68,6 @@ func newAuthenticateStateFromConfig(cfg *config.Config) (*authenticateState, err
|
|||
state.redirectURL, _ = urlutil.DeepCopy(cfg.Options.AuthenticateURL)
|
||||
state.redirectURL.Path = cfg.Options.AuthenticateCallbackPath
|
||||
|
||||
state.administrators = make(map[string]struct{}, len(cfg.Options.Administrators))
|
||||
for _, admin := range cfg.Options.Administrators {
|
||||
state.administrators[admin] = struct{}{}
|
||||
}
|
||||
|
||||
// shared state encoder setup
|
||||
state.sharedEncoder, err = jws.NewHS256Signer([]byte(cfg.Options.SharedKey))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue