Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: ACL Policies. Catch all server errors #5836

Merged
merged 3 commits into from
Jun 4, 2019

Conversation

johncowen
Copy link
Contributor

Previously we were only aware of one possible type of error on the contents of a Policy Ruleset (HCL syntax error), but there is also another type that occurs if you use the wrong terminology within the Rules themselves.

For example:

service "" {
  service = "write"
}

...is wrong as you cannot use the service keyword here, it should be:

service "" {
  policy = "write"
}

The backend reports a 500 error with the following message:

Invalid service policy: acl.ServicePolicy{Name:"service", Policy:"", Sentinel:acl.Sentinel{Code:"", EnforcementLevel:""}, Intentions:""}

But the UI doesn't display this.

This PR adds detection of this error and displays it.

@johncowen johncowen added the theme/ui Anything related to the UI label May 13, 2019
@johncowen johncowen requested review from a team and rboyer May 13, 2019 16:27
Copy link
Member

@hanshasselberg hanshasselberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@johncowen johncowen force-pushed the bugfix/ui-catch-all-server-errors branch from 5fd957c to e7a2949 Compare June 4, 2019 14:00
@johncowen johncowen merged commit 75e221d into master Jun 4, 2019
@johncowen johncowen deleted the bugfix/ui-catch-all-server-errors branch June 4, 2019 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants