Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Conversation

@jasontedor
Copy link
Member

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.

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.
* The "Uwe Schindler" algorithm.
*/
protected void checkTestExit(final int status) {
protected void checkExit(final int status, final String[] packagesThatCanExit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why we should change this signature, given that we already have the list of packages as an instance variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed f0dc394.

This commit removes a parameter from SecureSM#checkExit(int, String[])
that is not needed as the necessary values are a field on the instance.
This commit adds a convenience method for creating a test SecureSM for
which a standard set of packages can exit or halt the VM. Additionally,
a default constructor is added with the semantics that no package can
exit nor halt the virtual machine.
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we nuke these imports when pushing?

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed c8d058f.

@rmuir
Copy link
Contributor

rmuir commented Jul 5, 2016

+1, thank you. i left a note about unused imports, looks great.

@jasontedor jasontedor merged commit db51630 into elastic:master Jul 5, 2016
@jasontedor jasontedor deleted the exiting-packages branch July 5, 2016 10:44
@jasontedor
Copy link
Member Author

Thanks @rmuir.

@rmuir
Copy link
Contributor

rmuir commented Jul 5, 2016

now to figure out how to release a new version :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants