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

Have test_openssl.rb be explicit about security checks it adds #853

Closed
wants to merge 1 commit into from

Conversation

ratnikov
Copy link
Contributor

@ratnikov ratnikov commented Jul 3, 2013

Hey all,

With this commit I'm trying to get JRuby more explicit about the security checks it requires to run. There are three parts to this commit:

  1. General framework of being able to set allowed security checks for tests.
  2. General security checks that are assumed to be required to get JRuby running (in test/security_helper.rb)
  3. Specific security checks required for test_openssl.rb to work.

Please let me know what you think. Assuming this gets merged in, I'd like to tackle test_load.rb next to provide some motivation to get rid of CompoundJar loader. ;)

@headius
Copy link
Member

headius commented Nov 17, 2013

This is a very interesting commit. I will try to review it this week and see about getting it in.

We have long wanted to do a better job of integrating JVM security model with Ruby, including things like gracefully disabling features for which we do not have permissions, presenting a security API similar to the JVMs for Ruby use (disable eval, limit IO, restrict FFI binding of libraries, etc).

@headius
Copy link
Member

headius commented Nov 17, 2013

While I'm reviewing, maybe you could take another look over this. I think we will just merge this to master, since the functionality change is not immediately visible to a typical 1.7.x user, and this will fit into the plan of building a better security model for Ruby in JRuby.

@ratnikov
Copy link
Contributor Author

Is there some design doc about the Ruby security API or at least collection of ideas?

I feel that this commit is useful anyway, since it allows to reproduce restricted flows in the tests, which can be handy to get a good grasp on required permissions even for JRuby flows. For example, it is a bit weird to me that to load OpenSSL one needs to write user.timezone, but I guess the cleanup can be deferred.

@headius
Copy link
Member

headius commented Nov 2, 2016

@kares @ratnikov Is this still valid? We've since moved these files and updated to newer versions from MRI.

@ratnikov
Copy link
Contributor Author

ratnikov commented Nov 2, 2016

As long the openssl still requires security manager checks, I think this commit is still valid. I believe my intention was to make sure that JRuby tests are conscious about what security manager checks are introduced.

@kares kares added this to the Non-Release milestone Nov 3, 2016
kares pushed a commit to jruby/jruby-openssl that referenced this pull request Nov 3, 2016
@kares
Copy link
Member

kares commented Nov 3, 2016

Finally - moved, with some tunings, into jruby-openssl, thanks Dmitry

@kares kares closed this Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants