goto / guardian

Guardian is a tool for extensible and universal data access with automated access workflows and security controls across data stores, analytical systems, and cloud products.

Home Page:https://goto.github.io/guardian/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make appeal creator details fetch to external identity service non-blocking

rahmatrhd opened this issue · comments

Summary
Currently, when the identity service config is specified in the policy, the appeal creation would failed when the identity service returns an error or the user is not found. In a case where user details not found is allowed, the appeal won't be created unless the user exists in the identity service.

Proposed solution
Add a configuration option to make appeal creation not depending on identity service fetch. Appeal would still got created regardless the result from identity service.

userDetails, err := iamClient.GetUser(a.CreatedBy)
if err != nil {
return fmt.Errorf("fetching creator's user iam: %w", err)
}

Change the code above to log the error and return nil when there's an error from GetUser fetch