smaak 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27035ad1454d19486f2f6addce996be8ccd3dd2e
4
- data.tar.gz: 25d760f317f0c66a2bc85044557153ed49d5f290
3
+ metadata.gz: c625b2faec8089ccc1b1a3ffc3472237e9c05dc5
4
+ data.tar.gz: 917a6df39f7c236f875d86be62ff7e5508f1f156
5
5
  SHA512:
6
- metadata.gz: 25b4b43c69b9c98c5b70a56e45a74f67814d6c9ef59599951dd030981b621cb537f5ba3bfef9d00dc312913e017370c8ce0bf4679d75a40d454d0339b674b084
7
- data.tar.gz: 008556030e335a087d565db3ceac1a052b38fa57b45bd14d3f37dfe9fee837795d73720a6090716b71ab9a1dc992ecb9ef802a00b401e41b06e1d4437335a610
6
+ metadata.gz: 766fcdfe4c88209c0575d56fef859e7d5a5b025666421dc025345bd194f20c6b83fd25f5b0848682657c8ba98d917455fd9723765b603091374537efaa8a1f76
7
+ data.tar.gz: fb1d32ac19be19b94e7dc0c2bd93a02703db3690d0b65e544d92b117a489a5a1ab2cde109c46c5dbda4e71d96dbdbb98bc9bac4ea776d0a398a453345dd93a93
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ Gemfile.lock
4
4
  *gem
5
5
  backup
6
6
  doc
7
+ prototype
data/README.md CHANGED
@@ -4,7 +4,7 @@ This gems caters for both client and server sides of a signed message interactio
4
4
 
5
5
  ## Smaak mechanism
6
6
 
7
- When provisioning a Smaak::Server and a Smaak::Client, all associations these services should be aware of are provisioned by calling add_association. The associations are indexed by identifier (e.g. FQDN of the associate,) and remember the associate's public key, a pre-shared key and a boolean indicating whether the association expects data to encrypted.
7
+ When provisioning a Smaak::Server and a Smaak::Client, all associations these services should be aware of are provisioned by calling add_association. The associations are indexed by identifier (e.g. FQDN of the associate,) and remember the associate's public key, a pre-shared key and a boolean indicating whether the association expects data to be encrypted.
8
8
 
9
9
  Smaak appends 'x-smaak' headers to the HTTP request to convey a generated nonce, expiry, the requestor's identifier, the pre-shared key (obfuscated) and a digest of the request body. The headers are signed using the requestor (Smaak::Client)'s private key. If encryption is requested, the message body is encrypted using the receiver (Smaak::Server)'s public key. The message body for the response from the Smaak::Server to the Smaak::Client is also encrypted. RSA 4096 bit keys are recommended.
10
10
 
@@ -7,21 +7,21 @@ module Smaak
7
7
  @@instance = nil
8
8
  attr_reader :smaak_server
9
9
 
10
- def self.get_instance
10
+ def self.get_instance(configuration = nil)
11
11
  @@mutex.synchronize do
12
12
  if (@@instance.nil?)
13
- @@instance = self.new
13
+ @@instance = self.new(configuration)
14
14
  end
15
15
  @@instance
16
16
  end
17
17
  end
18
18
 
19
- def initialize
19
+ def initialize(configuration = nil)
20
20
  @smaak_server = Smaak::Server.new
21
- configure_service
21
+ configure_service(configuration)
22
22
  end
23
23
 
24
- def configure_service
24
+ def configure_service(configuration = nil)
25
25
  # @smaak_server.set_public_key(File.read('/service-provider-pub.pem'))
26
26
  # @smaak_server.add_association('service-client-01', File.read('service-client-01-public.pem'), 'pre-shared-key')
27
27
  end
data/lib/smaak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Smaak
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -11,7 +11,7 @@ class Tester < Smaak::SmaakService
11
11
  @@instance
12
12
  end
13
13
 
14
- def configure_service
14
+ def configure_service(configuration = nil)
15
15
  super
16
16
  @configured = true
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smaak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: persistent-cache