mongo_kerberos 2.0.0-java → 2.1.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +18 -16
- data/Rakefile +20 -6
- data/lib/mongo/auth/kerberos.rb +16 -3
- data/lib/mongo/auth/kerberos/conversation.rb +1 -1
- data/lib/mongo/auth/kerberos/jruby/authenticator.rb +0 -1
- data/lib/mongo/auth/kerberos/mri/authenticator.rb +1 -1
- data/lib/mongo/auth/kerberos/native.jar +0 -0
- data/lib/mongo/auth/kerberos/version.rb +1 -1
- data/spec/mongo/auth/kerberos/conversation_spec.rb +11 -0
- metadata +37 -39
- metadata.gz.sig +0 -0
- data/lib/mongo/auth/kerberos/jsasl.jar +0 -0
- data/lib/mongo/auth/kerberos/native.bundle +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e2de6f8cfaa9c165d303a911706ee37976ecfdfbb8852d0ad5c3076b94328241
|
4
|
+
data.tar.gz: 5158702d11b6f56273b8b6b89309ca251d11fea149e4bdde96357a8f9b029240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee973800a891b7638d576bb6351cd5158770556e382cab9aeb790de242f00fe4afe85c65d4de6527ba458f6f449f938c8fafd8a864f4e230bdd239126aef77a4
|
7
|
+
data.tar.gz: 7a5590b7b83ec1f1abb4bf936d4fde8bc6ae1edff557188b5c870485368e914f70a52ed0d98ed010a39663deed869c2ff479bca8ba993d7d45ff393f43b85141
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -1,15 +1,21 @@
|
|
1
|
-
Mongo Kerberos [](http://travis-ci.org/mongodb/mongo-ruby-kerberos) [](https://codeclimate.com/github/mongodb/mongo-ruby-kerberos) [](https://coveralls.io/r/mongodb/mongo-ruby-kerberos?branch=master)
|
2
|
-
====
|
1
|
+
# Mongo Kerberos [](http://travis-ci.org/mongodb/mongo-ruby-kerberos) [](https://codeclimate.com/github/mongodb/mongo-ruby-kerberos) [](https://coveralls.io/r/mongodb/mongo-ruby-kerberos?branch=master)
|
3
2
|
|
4
3
|
Provides Kerberos authentication support to the Mongo Ruby Driver.
|
5
4
|
|
6
|
-
Compatibility
|
7
|
-
-------------
|
8
5
|
|
9
|
-
|
6
|
+
## Compatibility
|
10
7
|
|
11
|
-
|
12
|
-
|
8
|
+
mongo_kerberos is tested against MRI (1.9.3+) and JRuby (9.1+).
|
9
|
+
|
10
|
+
### JRuby
|
11
|
+
|
12
|
+
In order to work with Kerberos TGTs that are in the system cache (e.g. obtained with `kinit`), the
|
13
|
+
JRuby extension sets the JVM system property "sun.security.jgss.native" to "true". Note that any
|
14
|
+
other use of the JGSS library will also be affected by this setting, meaning that any TGTs in the
|
15
|
+
system cache will be available for obtaining Kerberos credentials as well.
|
16
|
+
|
17
|
+
|
18
|
+
## Installation
|
13
19
|
|
14
20
|
libsasl is a requirement to be able to install the mongo_kerberos gem. Please see the
|
15
21
|
[Cyrus documentation](http://cyrusimap.web.cmu.edu/docs/cyrus-sasl/2.1.25/) for more
|
@@ -18,7 +24,7 @@ information.
|
|
18
24
|
With bundler, add the `mongo_kerberos` gem to your `Gemfile`.
|
19
25
|
|
20
26
|
```ruby
|
21
|
-
gem "mongo_kerberos", "~> 2.
|
27
|
+
gem "mongo_kerberos", "~> 2.1"
|
22
28
|
```
|
23
29
|
|
24
30
|
Require the `mongo_kerberos` gem in your application.
|
@@ -27,17 +33,13 @@ Require the `mongo_kerberos` gem in your application.
|
|
27
33
|
require "mongo_kerberos"
|
28
34
|
```
|
29
35
|
|
30
|
-
Usage
|
31
|
-
-----
|
32
|
-
|
33
36
|
|
34
|
-
API Documentation
|
35
|
-
-----------------
|
37
|
+
## API Documentation
|
36
38
|
|
37
39
|
The [API Documentation](http://rdoc.info/github/mongodb/mongo-ruby-kerberos/master/frames) is
|
38
40
|
located at rdoc.info.
|
39
41
|
|
40
|
-
Versioning
|
41
|
-
----------
|
42
|
+
## Versioning
|
42
43
|
|
43
|
-
As of 2.
|
44
|
+
As of 2.1.0, this project adheres to the
|
45
|
+
[Semantic Versioning Specification](http://semver.org/).
|
data/Rakefile
CHANGED
@@ -35,9 +35,9 @@ if jruby?
|
|
35
35
|
else
|
36
36
|
require "rake/extensiontask"
|
37
37
|
Rake::ExtensionTask.new do |ext|
|
38
|
-
ext.name = "
|
39
|
-
ext.ext_dir = "ext/
|
40
|
-
ext.lib_dir = "lib
|
38
|
+
ext.name = "mongo_kerberos_native"
|
39
|
+
ext.ext_dir = "ext/mongo_kerberos"
|
40
|
+
ext.lib_dir = "lib"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -62,9 +62,11 @@ end
|
|
62
62
|
task :clean_all => :clean do
|
63
63
|
begin
|
64
64
|
Dir.chdir(Pathname(__FILE__).dirname + "lib") do
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
["o", extension, "jar"].each do |e|
|
66
|
+
Dir.glob(File.join("**", "*.#{e}")).each do |f|
|
67
|
+
`rm #{f}`
|
68
|
+
end
|
69
|
+
end
|
68
70
|
end
|
69
71
|
rescue Exception => e
|
70
72
|
puts e.message
|
@@ -94,3 +96,15 @@ task :release => :build do
|
|
94
96
|
end
|
95
97
|
|
96
98
|
task :default => [ :clean_all, :spec ]
|
99
|
+
|
100
|
+
desc "Generate all documentation"
|
101
|
+
task :docs => 'docs:yard'
|
102
|
+
|
103
|
+
namespace :docs do
|
104
|
+
desc "Generate yard documention"
|
105
|
+
task :yard do
|
106
|
+
out = File.join('yard-docs', Mongo::Auth::Kerberos::VERSION)
|
107
|
+
FileUtils.rm_rf(out)
|
108
|
+
system "yardoc -o #{out} --title mongo-ruby-kerberos-#{Mongo::Auth::Kerberos::VERSION}"
|
109
|
+
end
|
110
|
+
end
|
data/lib/mongo/auth/kerberos.rb
CHANGED
@@ -22,13 +22,24 @@ module Mongo
|
|
22
22
|
#
|
23
23
|
# @since 2.0.0
|
24
24
|
class Kerberos
|
25
|
-
include Executable
|
26
25
|
|
27
|
-
# The authentication
|
26
|
+
# The authentication mechanism string.
|
28
27
|
#
|
29
28
|
# @since 2.0.0
|
30
29
|
MECHANISM = 'GSSAPI'.freeze
|
31
30
|
|
31
|
+
# Instantiate a new authenticator.
|
32
|
+
#
|
33
|
+
# example Create the authenticator.
|
34
|
+
# Mongo::Auth::Kerberos.new(user)
|
35
|
+
#
|
36
|
+
# @param [ Mongo::Auth::User ] user The user to authenticate.
|
37
|
+
#
|
38
|
+
# @since 2.0.1
|
39
|
+
def initialize(user)
|
40
|
+
@user = user
|
41
|
+
end
|
42
|
+
|
32
43
|
# Log the user in on the given connection.
|
33
44
|
#
|
34
45
|
# @example Log the user in.
|
@@ -41,10 +52,12 @@ module Mongo
|
|
41
52
|
#
|
42
53
|
# @since 2.0.0
|
43
54
|
def login(connection)
|
44
|
-
conversation = Conversation.new(user, connection.address.host)
|
55
|
+
conversation = Conversation.new(@user, connection.address.host)
|
45
56
|
reply = connection.dispatch([ conversation.start ])
|
57
|
+
connection.update_cluster_time(Operation::Result.new(reply))
|
46
58
|
until reply.documents[0][Conversation::DONE]
|
47
59
|
reply = connection.dispatch([ conversation.finalize(reply) ])
|
60
|
+
connection.update_cluster_time(Operation::Result.new(reply))
|
48
61
|
end
|
49
62
|
reply
|
50
63
|
end
|
@@ -113,7 +113,7 @@ module Mongo
|
|
113
113
|
|
114
114
|
# Create the new conversation.
|
115
115
|
#
|
116
|
-
# @example Create the new
|
116
|
+
# @example Create the new conversation.
|
117
117
|
# Conversation.new(user, 'test.example.com')
|
118
118
|
#
|
119
119
|
# @param [ Auth::User ] user The user to converse about.
|
Binary file
|
@@ -20,6 +20,17 @@ describe Mongo::Auth::Kerberos::Conversation do
|
|
20
20
|
and_return(authenticator)
|
21
21
|
end
|
22
22
|
|
23
|
+
context 'when the user has a realm', if: RUBY_PLATFORM == 'java' do
|
24
|
+
|
25
|
+
let(:user) do
|
26
|
+
Mongo::Auth::User.new(user: 'user1@MYREALM.ME')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'includes the realm in the username as it was provided' do
|
30
|
+
expect(conversation.user.name).to eq(user.name)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
23
34
|
describe '#start' do
|
24
35
|
|
25
36
|
let(:query) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_kerberos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Emily Stolfo
|
@@ -11,43 +11,43 @@ bindir: bin
|
|
11
11
|
cert_chain:
|
12
12
|
- |
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
aAz5f/hY4zFeYWvGDBHYEXE1rTN2hhMSyJscPcFbmz0=
|
14
|
+
MIIDRDCCAiygAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtkcml2
|
15
|
+
ZXItcnVieS9EQz0xMGdlbi9EQz1jb20wHhcNMTgxMDA0MTczODA5WhcNMTkxMDA0
|
16
|
+
MTczODA5WjAmMSQwIgYDVQQDDBtkcml2ZXItcnVieS9EQz0xMGdlbi9EQz1jb20w
|
17
|
+
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRXUgGvH0ZtWwDPc2umd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
|
35
34
|
dependencies:
|
36
35
|
- !ruby/object:Gem::Dependency
|
37
|
-
name: mongo
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 2.0.0
|
43
36
|
requirement: !ruby/object:Gem::Requirement
|
44
37
|
requirements:
|
45
|
-
- - ~>
|
38
|
+
- - "~>"
|
46
39
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.0
|
40
|
+
version: '2.0'
|
41
|
+
name: mongo
|
48
42
|
prerelease: false
|
49
43
|
type: :runtime
|
50
|
-
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
description: Adds Kerberos authentication via libsasl to the MongoDB Ruby Driver on
|
50
|
+
MRI and JRuby
|
51
51
|
email:
|
52
52
|
- mongodb-dev@googlegroups.com
|
53
53
|
executables: []
|
@@ -59,18 +59,16 @@ files:
|
|
59
59
|
- NOTICE
|
60
60
|
- README.md
|
61
61
|
- Rakefile
|
62
|
-
- lib/mongo_kerberos.rb
|
63
62
|
- lib/mongo/auth/kerberos.rb
|
64
63
|
- lib/mongo/auth/kerberos/conversation.rb
|
65
|
-
- lib/mongo/auth/kerberos/jsasl.jar
|
66
|
-
- lib/mongo/auth/kerberos/native.bundle
|
67
|
-
- lib/mongo/auth/kerberos/native.jar
|
68
|
-
- lib/mongo/auth/kerberos/version.rb
|
69
64
|
- lib/mongo/auth/kerberos/jruby/authenticator.rb
|
70
65
|
- lib/mongo/auth/kerberos/mri/authenticator.rb
|
71
|
-
-
|
66
|
+
- lib/mongo/auth/kerberos/native.jar
|
67
|
+
- lib/mongo/auth/kerberos/version.rb
|
68
|
+
- lib/mongo_kerberos.rb
|
72
69
|
- spec/mongo/auth/kerberos/conversation_spec.rb
|
73
70
|
- spec/mongo/auth/kerberos/mri/authenticator_spec.rb
|
71
|
+
- spec/spec_helper.rb
|
74
72
|
homepage: http://www.mongodb.org
|
75
73
|
licenses:
|
76
74
|
- Apache License Version 2.0
|
@@ -81,17 +79,17 @@ require_paths:
|
|
81
79
|
- lib
|
82
80
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
81
|
requirements:
|
84
|
-
- -
|
82
|
+
- - ">="
|
85
83
|
- !ruby/object:Gem::Version
|
86
84
|
version: 1.9.3
|
87
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
86
|
requirements:
|
89
|
-
- -
|
87
|
+
- - ">="
|
90
88
|
- !ruby/object:Gem::Version
|
91
89
|
version: 1.3.6
|
92
90
|
requirements: []
|
93
91
|
rubyforge_project: mongo_kerberos
|
94
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.7.6
|
95
93
|
signing_key:
|
96
94
|
specification_version: 4
|
97
95
|
summary: Kerberos authentication support for the MongoDB Ruby driver
|
metadata.gz.sig
CHANGED
Binary file
|
Binary file
|
Binary file
|