-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Authz] Eslint Rule for Security Config #193187
[Authz] Eslint Rule for Security Config #193187
Conversation
17f511c
to
f1983c8
Compare
f1983c8
to
b1d9bd6
Compare
@elasticmachine merge upstream |
/ci |
@elasticmachine merge upstream |
/ci |
Pinging @elastic/kibana-security (Team:Security) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
packages/kbn-eslint-plugin-eslint/rules/no_deprecated_authz_config.test.js
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
ESLint rule is introduced to enforce the migration of access tags in route configurations to the
security.authz.requiredPrivileges
field. It ensures that security configurations are correctly applied in both standard and versioned routes. Will be enabled after #191973 is merged.The rule covers:
Access Tag Migration. Moves
access:<privilege>
tags from theoptions.tags
property tosecurity.authz.requiredPrivileges
. Preserves any non-access tags in the tags property.Missing Security Config Detection. Reports an error if no security config is found in the route or version.
Suggests adding a default security configuration
authz: { enabled: false }
.Note
There is an indentation issues with the test,
dedent
doesn't solve most of the issues and sinceRuleTester
was designed to test a single rule at a time,I couldn't enable multiple fixes (including indent ones) before checking output.Manually adjusted the indentation.
Checklist
Fixes: #191715
Related: #191710