secrets_manager 0.1.0.rc1 → 0.2.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
  SHA256:
3
- metadata.gz: 591fa8a47b755504c95eaa952c9b5fbe1242c1f22d32258846b57b2bd02a922e
4
- data.tar.gz: 8412a6e7b76eb42744ad8f5506f003cbc71081de6f653190cb12f8793527bb5f
3
+ metadata.gz: d6f78bf44f4a693f45c3f0bb3866fffe8993818670c8bc11fc75576075a62765
4
+ data.tar.gz: 961c7ae680195646c3c7881907b2359ac973ff5a016349cc8752ec0f4e87f151
5
5
  SHA512:
6
- metadata.gz: e50276d674daca2c4c399f7a1437fcdf41b6dfc1dee7cd0047957b8fc5d7323188bad374fa6e7dd0338b50f9bff3c7ea522770be9acdd4cf0809c4cb011f5977
7
- data.tar.gz: bdfb15987e387471426c3abbcd05d843afbdce137f0e52135876a6c2f6ebfdcce58a1e9dc2f3416092d408c14ebc487c00549e06ac70ea601b30125564a9a9fd
6
+ metadata.gz: 2f61ee3edfe91765bdedd24668360b7a92bd427e86fd01e0dc1fc1ecfef7ad5aefff4334ca7338368addc850b68f683ab64bfcd0714840185342730d59f28a2a
7
+ data.tar.gz: 32f9a9da03bb54473a3e761dcdaf2a2b728f866dd00e068f44e3f957cbc3a92136d80dee43272a80b17337b63eb3800d7e15ca11cb62a84fef7663d7458f0d3d
@@ -0,0 +1,50 @@
1
+ secret_token: xa20f9e81af18eaa700c5b82fdf8f742e327997f2edfd51e0ca06f4c7607a9f134738956c894f3acf4d4e75d123d28463f1e401b71f8f1e8d7b32606da8c5bbe
2
+ secret_key_base: ccd0c97a895d390a91b7abeb19402abd76289703049fc0afa0bfb782ae2c48fb3d18e5eadafd4e92a9de92526e96de3881f8d3c28e8d898f7c8702c3773985a8
3
+ devise_pepper: aaae3bba030d00f7d0fe31efe059a7c65300f2b66a9e9caaa9073cdf7516c625a6e82380cc40a1648ac80baef4d61eb62cc555916414279bbf40a2e2a79b68cb
4
+ new_relic_license_key: 2b37dce8a11fe044b72f76b678e7facfa9106c0b
5
+ scout_key: YfCy1z7j1khWQXLm1aOs
6
+ bugsnag_api_key: e8f8b7441eb9a3485454021ea7531deb
7
+ openexchangerates_app_id: 6fe4a96c605d45bfb7e6684618c00b85
8
+ skylight_application: yThUM6HEHgBY
9
+ skylight_authentication: pcQ-Gxd6IZxou7UnRhglYhYGHE-MU5e4KanyVIwLaQY
10
+ stripe_api_key: sk_test_awJDnJlti7C7GHf421J9r4un
11
+ stripe_public_key: pk_test_laEwsPh7Jsn5z3jheVXAzDgQ
12
+ stripe_webhook_key: eedb76beffc5a6e6d52a915fbb153917
13
+ stripe_signing_secret: whsec_D2T3iGCnVnG2KCLOesdw8HSJI90ld2zi
14
+ intercom_app_id: 54uzduob
15
+ intercom_api_secret: wSeyBibWnWtfkODJkCkKHn9nKZNaeTLhEGjF-601
16
+ intercom_access_token: dG9rOjk1ODg2YzRiXzI5MmFfNGJhNV9hNzQ5X2Q1NGI0ODhkMWEyMjoxOjA=
17
+ developer_aws_access_key_id: AKIAIHOSWEEVKKIPMIXQ
18
+ developer_aws_secret_access_key: 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
19
+ developer_aws_bucket: productive-api-docs
20
+ clearbit_api_token: e5e7fededfe35c11a02a51333ca064fd
21
+ files_aws_access_key_id: AKIAJXZVZPAUM5RRVDGA
22
+ files_aws_secret_access_key: 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
23
+ files_aws_bucket: productive-files-development
24
+ mailgun_inbound_domain: inbox-development.productive.io
25
+ mailer_root_url: http://mailer.productive.io.localhost
26
+ rediscloud_url: redis://localhost:6379/0
27
+ firebase: AAAAXi_VihM:APA91bErEwDewgeBH7fkOjYn2-3SsG26i9Yzx30b3dsfBootKffXBcvYpatE_mXAaO7-YzTJPasp4_nuyJ_FfSIfRTMHtaugSPBPZoUdiJmIE9wGHp31Q7XnFglJ2ioZj4ECojimjpmP
28
+ quickbooks_oauth_consumer_key: Q08lq2LdTQpor8vzsmrd0hsOMTJIspIyLFrkMzVnVrumGE4Rq7
29
+ quickbooks_oauth_consumer_secret: GIqLVMpuX2zFEdB7npLOunMrbu6pbGYOArLMxcde
30
+ greenhouse_api_token: 6ff335980cc7c6d9f32530473211cb28-1
31
+ xero_oauth_consumer_key: PEAXBKJ3N61S3J8FCQDRBJXEWFNS72
32
+ xero_oauth_consumer_secret: Z4YTY3V4CXAYAE6PRWFNWS3CVFWBJJ
33
+ exact_client_id: fd474882-0746-4d12-921b-ff50a96719f6
34
+ exact_client_secret: k8GjxfFtkd6j
35
+ active_campaign_api_endpoint: https://productive64779.api-us1.com
36
+ active_campaign_api_key: b3ccb1d7c6df0a4a6c3a662027e08eec6947397a35610f47c58cc92b428c4c2b2c182e3e
37
+ resels_api_token: hETjJZnIb0E02754HMB12f4IBPwKuFgtf_xcvZzT_jkhQ9FN3uR4CQq5KQTSObrbP8QZVDg_sGJwHRY0zX5jNrR39Tg22YBM13cqmq6C9Jzc1ltLoYNZWW16ulZ0wIHx
38
+ partnerstack_public_key: pk_Hk3lyudLoFv1bEmzOPC7SOGIUwm1vpMs
39
+ partnerstack_private_key: sk_3AvDUWAMHy7L0S3XY7SYp4cX9Gn9aSuL
40
+ db_host: localhost
41
+ db_name: gauss_development
42
+ db_user: root
43
+ db_pass: ''
44
+ files_endpoint: files-development.productive.io
45
+ files_aws_region: us-east-1
46
+ jobs_token: dev-jobs-token
47
+ resize_token: dummy
48
+ sidekiq_redis_endpoint: redis://127.0.0.1:6379/0
49
+ sidekiq_username: productive
50
+ sidekiq_password: unproductive
@@ -2,12 +2,12 @@ require 'aws-sdk-secretsmanager'
2
2
 
3
3
  module SecretsManager
4
4
  class Client
5
- def initialize
6
- @client = Aws::SecretsManager::Client.new
5
+ def client
6
+ @client ||= Aws::SecretsManager::Client.new
7
7
  end
8
8
 
9
9
  def get_secret_string(secret_id)
10
- @client.get_secret_value(secret_id: secret_id).secret_string
10
+ client.get_secret_value(secret_id: secret_id).secret_string
11
11
  rescue Aws::SecretsManager::Errors::ServiceError
12
12
  aws_error(secret_id)
13
13
  end
@@ -0,0 +1,33 @@
1
+ require 'secrets_manager/config'
2
+ require 'secrets_manager/client'
3
+ require 'secrets_manager/helpers'
4
+
5
+ module SecretsManager
6
+ class Railtie < ::Rails::Railtie
7
+ config.before_configuration do
8
+ include SecretsManager::Helpers
9
+
10
+ unless File.file?(Rails.root.join('config', 'application.yml'))
11
+ puts 'Initializing secrets via Secrets Manager gem.'
12
+
13
+ config_path = Rails.root.join('secrets.json')
14
+ secrets_config = SecretsManager::Config.new(config_path, Rails.env).init
15
+ puts 'Secrets.json file is missing.' if secrets_config.nil?
16
+
17
+ aws_client = SecretsManager::Client.new
18
+
19
+ secrets_config.secrets.each do |secret|
20
+ next if File.file?(Rails.root.join(secret.path))
21
+
22
+ if secret.plaintext? && secret.to_file?
23
+ write_to_file(aws_client.get_secret_string(secret.id), secret.path)
24
+ else
25
+ aws_client.get_secret_hash(secret.id).each do |key, value|
26
+ ENV[key.to_s] = value
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  module SecretsManager
2
- VERSION = '0.1.0.rc1'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secrets_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - hmatic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2020-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-secretsmanager
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.20.0
27
- - !ruby/object:Gem::Dependency
28
- name: rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: thor
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +67,7 @@ files:
81
67
  - Rakefile
82
68
  - bin/secrets-manager
83
69
  - bin/secrets_manager
70
+ - config/application.yml
84
71
  - lib/secrets_manager.rb
85
72
  - lib/secrets_manager/cli.rb
86
73
  - lib/secrets_manager/cli/base.rb
@@ -88,6 +75,7 @@ files:
88
75
  - lib/secrets_manager/client.rb
89
76
  - lib/secrets_manager/config.rb
90
77
  - lib/secrets_manager/helpers.rb
78
+ - lib/secrets_manager/railtie.rb
91
79
  - lib/secrets_manager/version.rb
92
80
  - lib/tasks/productive_secrets_tasks.rake
93
81
  homepage: http://hrvojematic.com
@@ -105,12 +93,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
93
  version: '0'
106
94
  required_rubygems_version: !ruby/object:Gem::Requirement
107
95
  requirements:
108
- - - ">"
96
+ - - ">="
109
97
  - !ruby/object:Gem::Version
110
- version: 1.3.1
98
+ version: '0'
111
99
  requirements: []
112
100
  rubyforge_project:
113
- rubygems_version: 2.7.8
101
+ rubygems_version: 2.7.3
114
102
  signing_key:
115
103
  specification_version: 4
116
104
  summary: Easy secret management for AWS Secret Manager