-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Introduce secure security manager to project #28453
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
Conversation
This commit adds an assertion to the TestSecureSM#testNoModifySibling test that sanity checks that the second child was actually interrupted and therefore actually attempted to interrupt the first child.
Today, SecureSM has a mechanism that enables a hardcoded list of test packages to exit if the SecureSM instance is constructed with a boolean flag indicating that these packages will be permitted to exit. This commit replaces this mechanism by allowing the SecureSM instance to be constructed with a whitelist of packages that can exit. Relates elastic#4
Today a SecureSM security manager allows defining a list of packages that can exit the VM. However, today there are no restrictions on defining a package inside another JAR. This commit strengthens the ability to prevent exit by allowing construction of SecureSM to be done with a list of regular expressions (instead of a list of prefix names) that classes will be tested against. With this, a security manager can be installed that permits only exiting from an exact list of classes. Relates elastic#5
4d65b39
to
9f55409
Compare
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.
This looks good, but I think there are 2 other changes necessary:
- Modify the security policy to use the new jar name (I think that is why CI failed)
- Modify
BootstrapForTesting
to make it work in intellij (see the line for plugin-classloader there)
libs/secure-sm/build.gradle
Outdated
import org.elasticsearch.gradle.precommit.PrecommitTasks | ||
|
||
apply plugin: 'elasticsearch.build' | ||
apply plugin: 'nebula.optional-base' |
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.
Is this used?
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.
I removed this.
Thanks @rjernst. I force pushed a commit addressing your comments. I know we do not like force pushes in reviews but I force pushed here because we want to merge all the commits in this PR into master so as to preserve the original history of securesm. Adding more commits on top of my initial commit here would have a lot of other commits coming along for the ride that we do not want, we want only the original history from securesm and exactly one commit integrating securesm into elasticsearch. |
This commit migrates SecureSM, our secure security manager implementation, from its own repository to being a sub-project of Elasticsearch.
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
Closed via 1b3d529 |
This commit migrates SecureSM, our secure security manager implementation, from its own repository to being a sub-project of Elasticsearch.