yopass 1.1.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +1 -1
- data/CHANGELOG.md +7 -0
- data/Dockerfile +16 -0
- data/Gemfile +5 -3
- data/Gemfile.lock +26 -15
- data/Procfile +1 -1
- data/README.md +19 -10
- data/conf/yopass.yaml +1 -1
- data/config.ru +2 -0
- data/lib/yopass.rb +11 -13
- data/yopass.god +11 -0
- metadata +6 -5
- data/.buildpacks +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f8d26d2cb03549b70d5acdc9ce6acd7b6db3c9a
|
4
|
+
data.tar.gz: b095963eb8be973a7829a65838739b34e266c68b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b6f02e6ddf3fab9fd67d5cf39f784f7d59e735bbf2224832fc991f1cf0e9aa2eb769676d48ce6420b0da2c75c23ab5110d75eff4838077c8b20e4f20a47454e
|
7
|
+
data.tar.gz: b87e77bf5afe05a3a189f85a0d133298849086fb8a03f8e730a568fcfc41a572b52226293a32be61450d63d431c85e61bb99325f722fd8aefc128669c15afab7
|
data/.gemspec
CHANGED
data/CHANGELOG.md
CHANGED
data/Dockerfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
FROM ubuntu
|
2
|
+
MAINTAINER Johan Haals <johan.haals@gmail.com>
|
3
|
+
|
4
|
+
RUN apt-get update
|
5
|
+
RUN apt-get install -y git libsasl2-dev build-essential ruby ruby-dev memcached
|
6
|
+
|
7
|
+
RUN gem install foreman --no-rdoc --no-ri
|
8
|
+
RUN gem install bundler --no-rdoc --no-ri
|
9
|
+
RUN gem install god --no-rdoc --no-ri
|
10
|
+
|
11
|
+
RUN git clone https://github.com/jhaals/yopass /yopass
|
12
|
+
RUN cd /yopass && bundle install
|
13
|
+
|
14
|
+
EXPOSE 4567
|
15
|
+
# Ensure that both yopass and memcached is up and running
|
16
|
+
CMD ["god", "-c", "/yopass/yopass.god", "-D"]
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -10,25 +10,31 @@ GEM
|
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
backports (3.6.0)
|
13
|
+
daemons (1.1.9)
|
13
14
|
diff-lcs (1.2.5)
|
14
15
|
encryptor (1.3.0)
|
16
|
+
eventmachine (1.0.3)
|
15
17
|
memcached (1.7.2)
|
16
|
-
multi_json (1.
|
18
|
+
multi_json (1.10.1)
|
17
19
|
rack (1.5.2)
|
18
|
-
rack-protection (1.5.
|
20
|
+
rack-protection (1.5.3)
|
19
21
|
rack
|
20
22
|
rack-test (0.6.2)
|
21
23
|
rack (>= 1.0)
|
22
|
-
rake (10.
|
23
|
-
rspec (
|
24
|
-
rspec-core (~>
|
25
|
-
rspec-expectations (~>
|
26
|
-
rspec-mocks (~>
|
27
|
-
rspec-core (
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
rake (10.3.2)
|
25
|
+
rspec (3.0.0)
|
26
|
+
rspec-core (~> 3.0.0)
|
27
|
+
rspec-expectations (~> 3.0.0)
|
28
|
+
rspec-mocks (~> 3.0.0)
|
29
|
+
rspec-core (3.0.3)
|
30
|
+
rspec-support (~> 3.0.0)
|
31
|
+
rspec-expectations (3.0.3)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.0.0)
|
34
|
+
rspec-mocks (3.0.3)
|
35
|
+
rspec-support (~> 3.0.0)
|
36
|
+
rspec-support (3.0.3)
|
37
|
+
sinatra (1.4.5)
|
32
38
|
rack (~> 1.4)
|
33
39
|
rack-protection (~> 1.4)
|
34
40
|
tilt (~> 1.3, >= 1.3.4)
|
@@ -39,16 +45,21 @@ GEM
|
|
39
45
|
rack-test
|
40
46
|
sinatra (~> 1.4.0)
|
41
47
|
tilt (~> 1.3)
|
48
|
+
thin (1.6.2)
|
49
|
+
daemons (>= 1.0.9)
|
50
|
+
eventmachine (>= 1.0.0)
|
51
|
+
rack (>= 1.0.0)
|
42
52
|
tilt (1.4.1)
|
43
53
|
|
44
54
|
PLATFORMS
|
45
55
|
ruby
|
46
56
|
|
47
57
|
DEPENDENCIES
|
48
|
-
encryptor
|
49
|
-
memcached
|
58
|
+
encryptor
|
59
|
+
memcached
|
50
60
|
rake
|
51
61
|
rspec
|
52
|
-
sinatra
|
62
|
+
sinatra
|
53
63
|
sinatra-contrib
|
64
|
+
thin
|
54
65
|
yopass!
|
data/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
web: bundle exec
|
1
|
+
web: bundle exec rackup config.ru -p 4567 -s thin -o 0.0.0.0
|
data/README.md
CHANGED
@@ -1,31 +1,40 @@
|
|
1
1
|
# YoPass - Share Secrets Securely
|
2
2
|
[![Build Status](https://travis-ci.org/JHaals/yopass.png?branch=master)](https://travis-ci.org/JHaals/yopass)
|
3
3
|
|
4
|
-
YoPass is a website
|
5
|
-
|
4
|
+
YoPass is a website for sharing secrets in a quick and secure manner.
|
5
|
+
This project is created to minimize the amount of passwords floating around in ticket management systems, IRC logs and emails. YoPass generates a one-time URL with an expiration date so you don't have to worry about passwords being visible forever
|
6
6
|
|
7
7
|
* AES-256 encryption
|
8
8
|
* Secrets can only be viewed once
|
9
9
|
* No secrets are written to disk
|
10
|
-
* No
|
10
|
+
* No account or user management required
|
11
11
|
* Secrets self destruct after X hours
|
12
|
+
* Decryption key can be sent over SMS
|
12
13
|
|
13
14
|
#### Workflow
|
14
|
-
* Generate secret
|
15
|
+
* Generate secret/password
|
15
16
|
* Paste into the yopass website
|
16
|
-
* Receive URL with or without decryption key(can be
|
17
|
-
* Share with the intended person
|
18
|
-
* Secret is automatically removed
|
19
|
-
*
|
17
|
+
* Receive URL with or without the decryption key(can be transfered over other channel such as SMS)
|
18
|
+
* Share with the intended person
|
19
|
+
* Secret is automatically removed once viewed
|
20
|
+
* Feel safe
|
20
21
|
|
21
|
-
### Installation
|
22
|
+
### Installation / Configuration
|
23
|
+
YoPass Docker container available [here](https://hub.docker.com/u/jhaals/yopass)
|
24
|
+
|
25
|
+
Otherwise:
|
22
26
|
|
23
27
|
gem install yopass
|
24
28
|
|
25
29
|
* install and start memcached
|
26
|
-
* edit yopass.yaml and move it to
|
30
|
+
* edit `conf/yopass.yaml` and move it to desired location (don't forge to specify that path in the YOPASS_CONFIG environment variable)
|
27
31
|
* done!
|
28
32
|
|
33
|
+
Most settings can be configured with environment variables.
|
34
|
+
|
35
|
+
YOPASS_CONFIG='/path/to/yopass.yaml'
|
36
|
+
YOPASS_BASE_URL='https://yopass.mydomain.com'
|
37
|
+
YOPASS_MEMCACHED_URL='memcached_address'
|
29
38
|
|
30
39
|
### SMS providers
|
31
40
|
|
data/conf/yopass.yaml
CHANGED
data/config.ru
ADDED
data/lib/yopass.rb
CHANGED
@@ -10,17 +10,15 @@ class Yopass < Sinatra::Base
|
|
10
10
|
configure :development do
|
11
11
|
require 'sinatra/reloader'
|
12
12
|
register Sinatra::Reloader
|
13
|
-
set :config, YAML.load_file('conf/yopass.yaml')
|
14
|
-
end
|
15
|
-
configure :test do
|
16
|
-
set :config, YAML.load_file('conf/yopass.yaml')
|
17
|
-
end
|
18
|
-
configure :production do
|
19
|
-
set :config, YAML.load_file('/etc/yopass.yaml')
|
20
13
|
end
|
14
|
+
|
21
15
|
configure do
|
16
|
+
config = ENV['YOPASS_CONFIG'] || 'conf/yopass.yaml'
|
17
|
+
cfg = YAML.load_file(config)
|
18
|
+
set :config, cfg
|
19
|
+
set :base_url, ENV['YOPASS_BASE_URL'] || cfg['base_url']
|
22
20
|
set :public_folder, File.dirname(__FILE__) + '/static'
|
23
|
-
set :
|
21
|
+
set :mc, Memcached.new(ENV['YOPASS_MEMCACHED_URL'] || cfg['memcached_url'])
|
24
22
|
end
|
25
23
|
|
26
24
|
get '/' do
|
@@ -56,7 +54,7 @@ class Yopass < Sinatra::Base
|
|
56
54
|
|
57
55
|
# store secret in memcached
|
58
56
|
begin
|
59
|
-
settings.
|
57
|
+
settings.mc.set key, data, lifetime_options[lifetime]
|
60
58
|
rescue Memcached::ServerIsMarkedDead
|
61
59
|
return "Can't contact memcached"
|
62
60
|
end
|
@@ -72,13 +70,13 @@ class Yopass < Sinatra::Base
|
|
72
70
|
# TODO verification
|
73
71
|
sms.send(mobile_number, password)
|
74
72
|
return erb :secret_url, :locals => {
|
75
|
-
:url => URI.join(settings.
|
73
|
+
:url => URI.join(settings.base_url, "get?k=#{key}"),
|
76
74
|
:key_sent_to_mobile => true }
|
77
75
|
end
|
78
76
|
end
|
79
77
|
|
80
78
|
erb :secret_url, :locals => {
|
81
|
-
:url => URI.join(settings.
|
79
|
+
:url => URI.join(settings.base_url,"get?k=#{key}&p=#{password}"),
|
82
80
|
:key_sent_to_mobile => false }
|
83
81
|
end
|
84
82
|
|
@@ -93,7 +91,7 @@ class Yopass < Sinatra::Base
|
|
93
91
|
headers 'Expires' => '0'
|
94
92
|
|
95
93
|
begin
|
96
|
-
result = settings.
|
94
|
+
result = settings.mc.get params[:k]
|
97
95
|
rescue Memcached::NotFound
|
98
96
|
return erb :'404'
|
99
97
|
end
|
@@ -104,7 +102,7 @@ class Yopass < Sinatra::Base
|
|
104
102
|
rescue OpenSSL::Cipher::CipherError
|
105
103
|
return 'Invalid decryption key'
|
106
104
|
end
|
107
|
-
settings.
|
105
|
+
settings.mc.delete params[:k]
|
108
106
|
result
|
109
107
|
end
|
110
108
|
|
data/yopass.god
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yopass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Haals
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: encryptor
|
@@ -59,11 +59,11 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .buildpacks
|
63
62
|
- .gemspec
|
64
63
|
- .gitignore
|
65
64
|
- .travis.yml
|
66
65
|
- CHANGELOG.md
|
66
|
+
- Dockerfile
|
67
67
|
- Gemfile
|
68
68
|
- Gemfile.lock
|
69
69
|
- LICENSE
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- Rakefile
|
73
73
|
- conf/config.ru
|
74
74
|
- conf/yopass.yaml
|
75
|
+
- config.ru
|
75
76
|
- lib/static/js/jquery.address.js
|
76
77
|
- lib/static/js/jquery.js
|
77
78
|
- lib/static/packaged/css/font.css
|
@@ -117,6 +118,7 @@ files:
|
|
117
118
|
- spec/sms_provder_spec.rb
|
118
119
|
- spec/spec_helper.rb
|
119
120
|
- spec/yopass_spec.rb
|
121
|
+
- yopass.god
|
120
122
|
homepage: https://github.com/jhaals/yopass
|
121
123
|
licenses:
|
122
124
|
- Apache 2.0
|
@@ -138,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
140
|
version: '0'
|
139
141
|
requirements: []
|
140
142
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.0.
|
143
|
+
rubygems_version: 2.0.14
|
142
144
|
signing_key:
|
143
145
|
specification_version: 4
|
144
146
|
summary: Secure sharing for secrets and passwords
|
@@ -146,4 +148,3 @@ test_files:
|
|
146
148
|
- spec/bulksms_spec.rb
|
147
149
|
- spec/sms_provder_spec.rb
|
148
150
|
- spec/yopass_spec.rb
|
149
|
-
has_rdoc:
|
data/.buildpacks
DELETED