Skip to content

Commit

Permalink
IAM mappings file must be configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoon Prins committed Nov 2, 2021
1 parent 091de1f commit 76b7fd9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/auth/manager/oidcescape/oidcescape.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ func (c *config) init() {
if c.IDClaim == "" {
c.IDClaim = "sub"
}
if c.Users == "" {
c.Users = "/etc/revad/iam-escape-users.json"
}
}

func parseConfig(m map[string]interface{}) (*config, error) {
Expand Down Expand Up @@ -104,14 +101,14 @@ func (am *mgr) Configure(m map[string]interface{}) error {
am.iamUsers = map[string]*iamUser{}
f, err := ioutil.ReadFile(c.Users)
if err != nil {
return fmt.Errorf("oidcescape: error reading iam users file: +%v", err)
return fmt.Errorf("oidcescape: error reading escape iam users file: +%v", err)
}

iamUsers := []*iamUser{}

err = json.Unmarshal(f, &iamUsers)
if err != nil {
return fmt.Errorf("oidcescape: error unmarshalling iam users file: +%v", err)
return fmt.Errorf("oidcescape: error unmarshalling escape iam users file: +%v", err)
}

for _, u := range iamUsers {
Expand Down

0 comments on commit 76b7fd9

Please sign in to comment.