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

Riak 2 Feature: Security #149

Merged
merged 43 commits into from
May 7, 2014
Merged

Riak 2 Feature: Security #149

merged 43 commits into from
May 7, 2014

Conversation

bkerley
Copy link
Contributor

@bkerley bkerley commented Feb 18, 2014

The Ruby client needs to support security per basho/riak#355 .

  • configure local and tls credentials
c = Riak::Client.new(
                     pb_port: 17017,
                     authentication: {
                       user: 'user',
                       password: 'password',
                       server_ca: File.read('ca.crt'),
                       server_cert: File.read('server.crt')
                     }
                    )
  • upgrade a protobuffs connection to tls
  • kill the connection if the server doesn't have a valid cert
  • kill the connection if the server doesn't support tls
  • kill the conncetion if the server's cert is revoked
  • work correctly when requests succeed

(copied from #110 )

@bkerley bkerley mentioned this pull request Feb 18, 2014
7 tasks
@bkerley bkerley added this to the 2.0.0 milestone Apr 16, 2014

describe 'without authentication configured' do
let(:options){ Hash.new }
it 'should start a tcp connection and not start a tls connection' do
Copy link
Contributor

Choose a reason for hiding this comment

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

I worry that these tests basically describe an implementation (too many doubles). Is there a way to exercise the class at a higher level, or more like blackbox? Integration tests are fine.

Another option might be like the "mock server" we had previously where it would actually create a server-side version and you could verify what came across the wire.

You can also tell me to buzz off. 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there's already an integration test that hits these parts. The problem with those is that they require many different Riak configurations, and right now that means they basically don't get run on a regular basis. I'd prefer to keep these as a safety net, and I'm not sure if there's a much better way to express these.

@bkerley
Copy link
Contributor Author

bkerley commented May 6, 2014

  • put server cert in crl for pending spec
  • make other specs pass

@seancribbs
Copy link
Contributor

This works as advertised when using this PR to riak-ruby-vagrant: basho-labs/riak-ruby-vagrant#4

👍

bkerley added a commit that referenced this pull request May 7, 2014
@bkerley bkerley merged commit c708777 into master May 7, 2014
@bkerley bkerley deleted the bk-security branch May 7, 2014 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants