maestrano-rails 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +43 -38
- data/README.md +4 -7
- data/lib/generators/maestrano/templates/maestrano.rb +6 -139
- data/lib/maestrano/rails/routing/routes.rb +1 -9
- data/maestrano-rails.gemspec +8 -9
- data/test/dummy_activerecord/config/initializers/maestrano.rb +7 -85
- data/test/dummy_activerecord/log/test.log +2947 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/1Y/1YNesTg9JO8EmKnsQ5o2QuHPY1_SoBI4IzPgjGbNDtg.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/2E/2EMDck6E8hnJgftO6NKYnFBF3I7OY1XxmBhGYJx9hVU.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/2J/2JXGkjZ38teJKsoxInZDvaepp3CkHBoDSogY8mrjnz4.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/2y/2yOKmCmlo43TKFToC7sDi79zv1sEaKuRhPT-9RwLexo.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/5g/5g7dhxVp4YbZmFw_-T3aU2oYq2Z9Jgtps0CKneXYSS0.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/6C/6CJDEgEqVZ6WWB28_UrOgZXJ7imhTkyPfJCnjZaeHQo.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/9v/9vZgtlozMnArb7R4KXZgyLUlc2hAKYMVeczENURRLfk.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/BD/BD9vS-VA_G0ByKRS5cM8hNg17DhxAUCnbjirsC7QZT8.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/BQ/BQtyJR3ccqed7_s43p3BPj3IL18LWu1Fo1ZnzWC3qcc.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Br/BrPxwjWI-O7aKFPR9IHgVHTz--0ve7HgO1xAHOSorxw.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/D0/D0oQIDvZMxs7K1-bwAjXYaRTXNnKIB-vk4wDO3Mw3d4.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Eg/Eg9dsjuoufOcT1ojGffj56kcFY4ujQHBl4iBxaHNywQ.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/GN/GN7EpxkaiDaaLFjlptcIZ0BjIwz4SQv-J6Si_qHNtRQ.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/GX/GXBrspUeZnBiwFADWDaNmSYt9wkavup0id1nDW51SwI.cache +3 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/J7/J7Oklw3hOELd9594tXtFa2w66T4_zffVHzJ8TfX9uwc.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Lg/LgG4iMjI9pzWwqLjXp3JvB3xs8j14SUJzG4eRCYOWrU.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/MJ/MJ2lcrIryOfzt2cWGx3d8LeFOJoLuIAlrL7SCdGMaik.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Oa/OaJik9XhKBzY7AT4At2irZpA2GTHO3p4_hUa1ORSzjc.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/PJ/PJU52zcAkrMbEOmlo13u_i04nf-PXPCL_i6_ybo2AYo.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/VN/VNCapNKJLeponthNeFJhaBYs92UBT3P8PugENHP0474.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/VO/VOqmZhoZgNGgBPBfKq2xsc37yyNBBqntTUWteHs1VVc.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Vl/VlVHSjm74GkjWDuZlfcI6KAaQ9xjg8meWAssVwt-YMI.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Vt/VtysXvEqJf4LwL6kuKUSWHZbeR_jKoYj_z1L99d5Yzk.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/W1/W1I750hXtFauIXfdF_h8f0H6Eh9fPjn1nb3WDnJGJ_0.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/W_/W_AqS_Ihb1uBTP5eubT7Ep7vc3CcoUzol5J0T4xQsL0.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/Yc/YcfvUdqaxEInuhPH8QMPNyhWsGLwtIx76o-tR_VUc_0.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/_S/_SiC-nT_xG9vCIPkHUmC7GfAGNufVJLYqHQ4vQLOjvs.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/_m/_m7Yy9Dl3hfylyoF91XSCvlOZ3762vGWH_ZhkTvreMU.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/ak/akBxy_qeJ5hlUAP5G80qm_ZsKBlpXViO9rGg95rWx8U.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/b7/b7lBpkBxQaCxHBBRf-QF0CiQKnRE8kYGLUzgAPTjf_k.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/c2/c2LxqcKRpYH4PIKJj0RIMbpQeONqcvmk8zRZ3qAd4no.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/dp/dplQ3jBb_bBGoJ4xMRKxYbJR5YoZjuyamwFopJb07Xo.cache +3 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/eZ/eZWyKd8Y-LcqrovIoB-YJiklulQC0CGG0d22eCJcYuU.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/em/emPaz2829mOOQZolLXyEoXP73X44t4p-YUUA763b_1k.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/fk/fkliCI8v5fyy_CObCj5Va9hEnO4JqIPX6WBhUYUJS4k.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/hk/hkWnysQ9aaUtcEVLGt9gkfzIPrFfFqnR1P4LlriYD40.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/j3/j3F-bQu56g8H580zxIStr369Vt2DEbb0BQJ21ie2eoI.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/jK/jK6-bONOghUmAYu3DkuJ2MLIlLa8P9kbTE3tc1wBheg.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/jm/jmJh54mguyD0TmNGQ4ExIqEW4jR1jQeJcO5mhggpfMs.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/jt/jtrPJEzuZbLsfLK4SZphEu2PPyopSCtRfXQwj2AyAZg.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/kQ/kQZfXHFhuNUcLTvh4QzLL6fKDZc-8XkwCwT8eMIW8ns.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/l_/l_tJ9WwBL9Q8XjxQN56nGuGtCrP7kGBvE8e76g8tRC0.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/my/mybo3dsRj5MFU0orUFY47lfsYuIuBB_KL1Z4aNANxYI.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/qo/qob9eyRuMnynEh3V1dqTC-rEE-j5mOlG7t6EamNVBFY.cache +3 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/rf/rfsxw1dZNQvrAvAmqFP8bFeBcVIAPuvqozFzw80eS-4.cache +0 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/rm/rmsobLUxsQY2_hRp-ygb9dlbdoHpFlV6FMPnhxqpA1k.cache +3 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/sm/sm0X5aOvu10an00TtKAEtdF3Wpi08DQrHKEe3XXNHtk.cache +1 -0
- data/test/dummy_activerecord/tmp/cache/assets/sprockets/v3.0/x_/x_ZYCJrtiH6rATOiHF1QuxobPhpt7IRQUwciwGdXOxo.cache +0 -0
- data/test/dummy_mongoid/config/initializers/maestrano.rb +7 -85
- data/test/tmp/app/controllers/maestrano/account/group_users_controller.rb +27 -0
- data/test/tmp/app/controllers/maestrano/account/groups_controller.rb +37 -0
- data/test/tmp/app/controllers/maestrano/auth/saml_controller.rb +57 -0
- data/test/tmp/config/initializers/maestrano.rb +7 -0
- data/test/tmp/config/routes.rb +60 -0
- metadata +99 -10
- data/app/controllers/maestrano/rails/metadata_controller.rb +0 -10
- data/test/controllers/metadata_controller_test.rb +0 -24
- data/test/tmp/app/models/monster.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4b49bdb15b181380859f23803e3a71e8e6eb337
|
4
|
+
data.tar.gz: 0a18fb96c3100d317505114e8ff2c660b0fb788e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30aa342a8e3372cb31d6ee74cd371de2a4ed4a744108f10bf6a25054e564ef1146e7d9db0fb95b98a7036fbb19df1cfad05a1e8e0223b5c052f86b78062788bc
|
7
|
+
data.tar.gz: 47781cfd2033777cd73e5730d88a0672e5d9ab340a7ef7810bfd7c5976bf0d76439087af3660956f735649275fac133afd11d26069aa02ab0dce385294b704e0
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/jruby/activerecord-jdbc-adapter.git
|
3
|
-
revision:
|
3
|
+
revision: ee68c1881a9b0ce59f5095cd1999c109bddf6167
|
4
4
|
branch: rails-5
|
5
5
|
specs:
|
6
6
|
|
@@ -42,26 +42,29 @@ GEM
|
|
42
42
|
minitest (~> 5.1)
|
43
43
|
thread_safe (~> 0.3, >= 0.3.4)
|
44
44
|
tzinfo (~> 1.1)
|
45
|
-
addressable (2.
|
46
|
-
|
47
|
-
|
45
|
+
addressable (2.5.0)
|
46
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
47
|
+
arel (6.0.4)
|
48
|
+
bson (4.2.1)
|
48
49
|
builder (3.2.2)
|
49
|
-
concurrent-ruby (1.0.
|
50
|
+
concurrent-ruby (1.0.4)
|
50
51
|
database_cleaner (1.5.3)
|
51
52
|
descendants_tracker (0.0.4)
|
52
53
|
thread_safe (~> 0.3, >= 0.3.1)
|
53
|
-
domain_name (0.5.
|
54
|
+
domain_name (0.5.20161129)
|
54
55
|
unf (>= 0.0.5, < 1.0.0)
|
55
56
|
erubis (2.7.0)
|
56
57
|
faraday (0.9.2)
|
57
58
|
multipart-post (>= 1.2, < 3)
|
58
59
|
git (1.3.0)
|
59
|
-
github_api (0.
|
60
|
-
addressable (~> 2.
|
61
|
-
descendants_tracker (~> 0.0.
|
60
|
+
github_api (0.11.3)
|
61
|
+
addressable (~> 2.3)
|
62
|
+
descendants_tracker (~> 0.0.1)
|
62
63
|
faraday (~> 0.8, < 0.10)
|
63
|
-
hashie (>=
|
64
|
-
|
64
|
+
hashie (>= 1.2)
|
65
|
+
multi_json (>= 1.7.5, < 2.0)
|
66
|
+
nokogiri (~> 1.6.0)
|
67
|
+
oauth2
|
65
68
|
globalid (0.3.7)
|
66
69
|
activesupport (>= 4.1.0)
|
67
70
|
haml (4.0.7)
|
@@ -84,17 +87,18 @@ GEM
|
|
84
87
|
httparty (0.14.0)
|
85
88
|
multi_xml (>= 0.5.2)
|
86
89
|
i18n (0.7.0)
|
87
|
-
jeweler (2.
|
90
|
+
jeweler (2.3.2)
|
88
91
|
builder
|
89
92
|
bundler (>= 1.0)
|
90
93
|
git (>= 1.2.5)
|
91
|
-
github_api
|
94
|
+
github_api (~> 0.11.0)
|
92
95
|
highline (>= 1.6.15)
|
93
96
|
nokogiri (>= 1.5.10)
|
97
|
+
psych (~> 2.2)
|
94
98
|
rake
|
95
99
|
rdoc
|
96
|
-
|
97
|
-
jquery-rails (4.2.
|
100
|
+
semver2
|
101
|
+
jquery-rails (4.2.2)
|
98
102
|
rails-dom-testing (>= 1, < 3)
|
99
103
|
railties (>= 4.2.0)
|
100
104
|
thor (>= 0.14, < 2.0)
|
@@ -104,7 +108,7 @@ GEM
|
|
104
108
|
nokogiri (>= 1.5.9)
|
105
109
|
macaddr (1.7.1)
|
106
110
|
systemu (~> 2.6.2)
|
107
|
-
maestrano (1.0.
|
111
|
+
maestrano (1.0.1)
|
108
112
|
httparty (~> 0.14)
|
109
113
|
json (~> 1.8)
|
110
114
|
mime-types (~> 1.25)
|
@@ -116,32 +120,34 @@ GEM
|
|
116
120
|
metaclass (0.0.4)
|
117
121
|
mime-types (1.25.1)
|
118
122
|
mini_portile2 (2.1.0)
|
119
|
-
minitest (5.
|
123
|
+
minitest (5.10.1)
|
120
124
|
mocha (1.2.1)
|
121
125
|
metaclass (~> 0.0.1)
|
122
|
-
mongo (2.
|
123
|
-
bson (
|
124
|
-
mongoid (5.1.
|
126
|
+
mongo (2.4.1)
|
127
|
+
bson (>= 4.2.1, < 5.0.0)
|
128
|
+
mongoid (5.1.6)
|
125
129
|
activemodel (~> 4.0)
|
126
130
|
mongo (~> 2.1)
|
127
131
|
origin (~> 2.2)
|
128
132
|
tzinfo (>= 0.3.37)
|
129
133
|
multi_json (1.12.1)
|
130
|
-
multi_xml (0.
|
134
|
+
multi_xml (0.6.0)
|
131
135
|
multipart-post (2.0.0)
|
132
136
|
netrc (0.11.0)
|
133
137
|
nokogiri (1.6.8.1)
|
134
138
|
mini_portile2 (~> 2.1.0)
|
135
|
-
oauth2 (1.
|
136
|
-
faraday (>= 0.8, < 0.
|
139
|
+
oauth2 (1.3.0)
|
140
|
+
faraday (>= 0.8, < 0.11)
|
137
141
|
jwt (~> 1.0)
|
138
142
|
multi_json (~> 1.3)
|
139
143
|
multi_xml (~> 0.5)
|
140
144
|
rack (>= 1.2, < 3)
|
141
|
-
origin (2.
|
145
|
+
origin (2.3.0)
|
142
146
|
pg (0.19.0)
|
143
|
-
power_assert (0.
|
144
|
-
|
147
|
+
power_assert (0.4.1)
|
148
|
+
psych (2.2.2)
|
149
|
+
public_suffix (2.0.5)
|
150
|
+
rack (1.6.5)
|
145
151
|
rack-test (0.6.3)
|
146
152
|
rack (>= 1.0)
|
147
153
|
rails (4.2.7.1)
|
@@ -157,9 +163,9 @@ GEM
|
|
157
163
|
sprockets-rails
|
158
164
|
rails-deprecated_sanitizer (1.0.3)
|
159
165
|
activesupport (>= 4.2.0.alpha)
|
160
|
-
rails-dom-testing (1.0.
|
166
|
+
rails-dom-testing (1.0.8)
|
161
167
|
activesupport (>= 4.2.0.beta, < 5.0)
|
162
|
-
nokogiri (~> 1.6
|
168
|
+
nokogiri (~> 1.6)
|
163
169
|
rails-deprecated_sanitizer (>= 1.0.1)
|
164
170
|
rails-html-sanitizer (1.0.3)
|
165
171
|
loofah (~> 2.0)
|
@@ -168,24 +174,23 @@ GEM
|
|
168
174
|
activesupport (= 4.2.7.1)
|
169
175
|
rake (>= 0.8.7)
|
170
176
|
thor (>= 0.18.1, < 2.0)
|
171
|
-
rake (
|
172
|
-
rdoc (
|
173
|
-
json (~> 1.4)
|
177
|
+
rake (12.0.0)
|
178
|
+
rdoc (5.0.0)
|
174
179
|
rest-client (1.8.0)
|
175
180
|
http-cookie (>= 1.0.2, < 2.0)
|
176
181
|
mime-types (>= 1.16, < 3.0)
|
177
182
|
netrc (~> 0.7)
|
178
183
|
ruby_parser (3.8.3)
|
179
184
|
sexp_processor (~> 4.1)
|
180
|
-
|
185
|
+
semver2 (3.4.2)
|
181
186
|
sexp_processor (4.7.0)
|
182
187
|
shoulda (3.5.0)
|
183
188
|
shoulda-context (~> 1.0, >= 1.0.1)
|
184
189
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
185
|
-
shoulda-context (1.2.
|
190
|
+
shoulda-context (1.2.2)
|
186
191
|
shoulda-matchers (2.8.0)
|
187
192
|
activesupport (>= 3.0.0)
|
188
|
-
sprockets (3.7.
|
193
|
+
sprockets (3.7.1)
|
189
194
|
concurrent-ruby (~> 1.0)
|
190
195
|
rack (> 1, < 3)
|
191
196
|
sprockets-rails (3.2.0)
|
@@ -194,9 +199,9 @@ GEM
|
|
194
199
|
sprockets (>= 3.0.0)
|
195
200
|
sqlite3 (1.3.12)
|
196
201
|
systemu (2.6.5)
|
197
|
-
test-unit (3.2.
|
202
|
+
test-unit (3.2.3)
|
198
203
|
power_assert
|
199
|
-
thor (0.19.
|
204
|
+
thor (0.19.4)
|
200
205
|
thread_safe (0.3.5)
|
201
206
|
tilt (2.0.5)
|
202
207
|
tzinfo (1.2.2)
|
@@ -218,7 +223,7 @@ DEPENDENCIES
|
|
218
223
|
haml-rails
|
219
224
|
jeweler
|
220
225
|
jquery-rails
|
221
|
-
maestrano (
|
226
|
+
maestrano (~> 1.0.0)
|
222
227
|
mocha (~> 1.1)
|
223
228
|
mongoid
|
224
229
|
pg
|
@@ -228,4 +233,4 @@ DEPENDENCIES
|
|
228
233
|
test-unit (~> 3)
|
229
234
|
|
230
235
|
BUNDLED WITH
|
231
|
-
1.
|
236
|
+
1.13.7
|
data/README.md
CHANGED
@@ -25,11 +25,8 @@ Maestrano Cloud Integration is currently in closed beta. Want to know more? Send
|
|
25
25
|
|
26
26
|
|
27
27
|
## Getting Setup
|
28
|
-
|
29
|
-
|
30
|
-
For testing purpose we provide an API Sandbox where you can freely obtain an App ID and API Key. The sandbox is great to test single sign-on and API integration (e.g: billing API).
|
31
|
-
|
32
|
-
To get started just go to: http://api-sandbox.maestrano.io
|
28
|
+
To start the integration of your application with the Maestrano platform, you first need to register your application on our Developer Platform. You can find [more information here](https://maestrano.atlassian.net/wiki/x/NYA3Ag)
|
29
|
+
Once your application is registered, you will be provided with API keys that are used to configure your application on the different marketplaces powered by Maestrano.
|
33
30
|
|
34
31
|
A **rails demo application** is also available: https://github.com/maestrano/demoapp-rails
|
35
32
|
|
@@ -53,7 +50,7 @@ After you install Maestrano and add it to your Gemfile, you need to run the gene
|
|
53
50
|
rails generate maestrano:install
|
54
51
|
```
|
55
52
|
|
56
|
-
The generator will install an initializer which describes
|
53
|
+
The generator will install an initializer which describes Maestrano's configuration options.
|
57
54
|
|
58
55
|
The generator also generates a SamlController for single sign-on that you will need to customize (see below) as well as the required routes.
|
59
56
|
|
@@ -279,6 +276,6 @@ So if you have any question or need help integrating with us just let us know at
|
|
279
276
|
|
280
277
|
## License
|
281
278
|
|
282
|
-
MIT License. Copyright
|
279
|
+
MIT License. Copyright 2017 Maestrano Pty Ltd. https://maestrano.com
|
283
280
|
|
284
281
|
You are not granted rights or licenses to the trademarks of Maestrano.
|
@@ -1,140 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# If set to 'test' then requests will be made to api-sandbox.maestrano.io
|
8
|
-
# The api-sandbox allows you to easily test integration scenarios.
|
9
|
-
# More details on http://api-sandbox.maestrano.io
|
10
|
-
#
|
11
|
-
config.environment = 'test' # or 'production'
|
12
|
-
|
13
|
-
# ==> Application host
|
14
|
-
# This is your application host (e.g: my-app.com) which is ultimately
|
15
|
-
# used to redirect users to the right SAML url during SSO handshake.
|
16
|
-
#
|
17
|
-
config.app.host = (config.environment == 'production' ? 'https://my-app.com' : 'http://localhost:3000')
|
18
|
-
|
19
|
-
# ==> App ID & API key
|
20
|
-
# Your application App ID and API key which you can retrieve on http://maestrano.com
|
21
|
-
# via your cloud partner dashboard.
|
22
|
-
# For testing you can retrieve/generate an api.id and api.key from the API Sandbox directly
|
23
|
-
# on http://api-sandbox.maestrano.io
|
24
|
-
#
|
25
|
-
config.api.id = (config.environment == 'production' ? 'prod_app_id' : 'sandbox_app_id')
|
26
|
-
config.api.key = (config.environment == 'production' ? 'prod_api_key' : 'sandbox_api_key')
|
27
|
-
|
28
|
-
# ==> Single Sign-On activation
|
29
|
-
# Enable/Disable single sign-on. When troubleshooting authentication issues
|
30
|
-
# you might want to disable SSO temporarily
|
31
|
-
#
|
32
|
-
# config.sso.enabled = true
|
33
|
-
|
34
|
-
# ==> Single Sign-On Identity Manager
|
35
|
-
# By default we consider that the domain managing user identification
|
36
|
-
# is the same as your application host (see above config.app.host parameter)
|
37
|
-
# If you have a dedicated domain managing user identification and therefore
|
38
|
-
# responsible for the single sign-on handshake (e.g: https://idp.my-app.com)
|
39
|
-
# then you can specify it below
|
40
|
-
#
|
41
|
-
# config.sso.idm = (config.environment == 'production' ? 'https://idp.my-app.com' : 'http://localhost:3000')
|
42
|
-
|
43
|
-
# ==> SSO Initialization endpoint
|
44
|
-
# This is your application path to the SAML endpoint that allows users to
|
45
|
-
# initialize SSO authentication. Upon reaching this endpoint users your
|
46
|
-
# application will automatically create a SAML request and redirect the user
|
47
|
-
# to Maestrano. Maestrano will then authenticate and authorize the user. Upon
|
48
|
-
# authorization the user gets redirected to your application consumer endpoint
|
49
|
-
# (see below) for initial setup and/or login.
|
50
|
-
#
|
51
|
-
# The controller for this path is automatically
|
52
|
-
# generated when you run 'rake maestrano:install' and is available at
|
53
|
-
# <rails_root>/app/controllers/maestrano/auth/saml.rb
|
54
|
-
#
|
55
|
-
config.sso.init_path = '/maestrano/auth/saml/init/default'
|
56
|
-
|
57
|
-
# ==> SSO Consumer endpoint
|
58
|
-
# This is your application path to the SAML endpoint that allows users to
|
59
|
-
# finalize SSO authentication. During the 'consume' action your application
|
60
|
-
# sets users (and associated group) up and/or log them in.
|
61
|
-
#
|
62
|
-
# The controller for this path is automatically
|
63
|
-
# generated when you run 'rake maestrano:install' and is available at
|
64
|
-
# <rails_root>/app/controllers/maestrano/auth/saml.rb
|
65
|
-
#
|
66
|
-
config.sso.consume_path = '/maestrano/auth/saml/consume/default'
|
67
|
-
|
68
|
-
# ==> Single Logout activation
|
69
|
-
# Enable/Disable single logout. When troubleshooting authentication issues
|
70
|
-
# you might want to disable SLO temporarily.
|
71
|
-
# If set to false then Maestrano::SSO::Session#valid? - which should be
|
72
|
-
# used in a controller before filter to check user session - always return true
|
73
|
-
#
|
74
|
-
# config.sso.slo_enabled = true
|
75
|
-
|
76
|
-
# ==> SSO User creation mode
|
77
|
-
# !IMPORTANT
|
78
|
-
# On Maestrano users can take several "instances" of your service. You can consider
|
79
|
-
# each "instance" as 1) a billing entity and 2) a collaboration group (this is
|
80
|
-
# equivalent to a 'customer account' in a commercial world). When users login to
|
81
|
-
# your application via single sign-on they actually login via a specific group which
|
82
|
-
# is then supposed to determine which data they have access to inside your application.
|
83
|
-
#
|
84
|
-
# E.g: John and Jack are part of group 1. They should see the same data when they login to
|
85
|
-
# your application (employee info, analytics, sales etc..). John is also part of group 2
|
86
|
-
# but not Jack. Therefore only John should be able to see the data belonging to group 2.
|
87
|
-
#
|
88
|
-
# In most application this is done via collaboration/sharing/permission groups which is
|
89
|
-
# why a group is required to be created when a new user logs in via a new group (and
|
90
|
-
# also for billing purpose - you charge a group, not a user directly).
|
91
|
-
#
|
92
|
-
# == mode: 'real'
|
93
|
-
# In an ideal world a user should be able to belong to several groups in your application.
|
94
|
-
# In this case you would set the 'sso.creation_mode' to 'real' which means that the uid
|
95
|
-
# and email we pass to you are the actual user email and maestrano universal id.
|
96
|
-
#
|
97
|
-
# == mode: 'virtual'
|
98
|
-
# Now let's say that due to technical constraints your application cannot authorize a user
|
99
|
-
# to belong to several groups. Well next time John logs in via a different group there will
|
100
|
-
# be a problem: the user already exists (based on uid or email) and cannot be assigned
|
101
|
-
# to a second group. To fix this you can set the 'sso.creation_mode' to 'virtual'. In this
|
102
|
-
# mode users get assigned a truly unique uid and email across groups. So next time John logs
|
103
|
-
# in a whole new user account can be created for him without any validation problem. In this
|
104
|
-
# mode the email we assign to him looks like "usr-sdf54.cld-45aa2@mail.maestrano.com". But don't
|
105
|
-
# worry we take care of forwarding any email you would send to this address
|
106
|
-
#
|
107
|
-
# config.sso.creation_mode = 'real' # or 'virtual'
|
108
|
-
|
109
|
-
# ==> Account Webhooks
|
110
|
-
# Single sign on has been setup into your app and Maestrano users are now able
|
111
|
-
# to use your service. Great! Wait what happens when a business (group) decides to
|
112
|
-
# stop using your service? Also what happens when a user gets removed from a business?
|
113
|
-
# Well the endpoints below are for Maestrano to be able to notify you of such
|
114
|
-
# events.
|
115
|
-
#
|
116
|
-
# Even if the routes look restful we issue only issue DELETE requests for the moment
|
117
|
-
# to notify you of any service cancellation (group deletion) or any user being
|
118
|
-
# removed from a group.
|
119
|
-
#
|
120
|
-
# The controllers for these hooks path are automatically generated when
|
121
|
-
# you run 'rake maestrano:install' and is available under
|
122
|
-
# <rails_root>/app/controllers/maestrano/account/
|
123
|
-
#
|
124
|
-
config.webhook.account.groups_path = '/maestrano/account/groups/:id/default'
|
125
|
-
config.webhook.account.group_users_path = '/maestrano/account/groups/:group_id/users/:id/default'
|
1
|
+
if Rails.env.test?
|
2
|
+
Maestrano.configure do |config|
|
3
|
+
config.environment = 'local'
|
4
|
+
end
|
5
|
+
else
|
6
|
+
Maestrano.auto_configure
|
126
7
|
end
|
127
|
-
|
128
|
-
# Example of multi-tenant configuration
|
129
|
-
Maestrano['other-tenant'].configure do |config|
|
130
|
-
config.environment = 'test'
|
131
|
-
config.app.host = (config.environment == 'production' ? 'https://my-app.com' : 'http://localhost:3000')
|
132
|
-
|
133
|
-
config.api.id = (config.environment == 'production' ? 'prod_app_id' : 'sandbox_app_id')
|
134
|
-
config.api.key = (config.environment == 'production' ? 'prod_api_key' : 'sandbox_api_key')
|
135
|
-
|
136
|
-
config.sso.init_path = '/maestrano/auth/saml/init/other-tenant'
|
137
|
-
config.sso.consume_path = '/maestrano/auth/saml/consume/other-tenant'
|
138
|
-
config.webhook.account.groups_path = '/maestrano/account/groups/:id/other-tenant'
|
139
|
-
config.webhook.account.group_users_path = '/maestrano/account/groups/:group_id/users/:id/other-tenant'
|
140
|
-
end
|
@@ -2,14 +2,6 @@ module ActionDispatch::Routing
|
|
2
2
|
class Mapper
|
3
3
|
def maestrano_routes
|
4
4
|
namespace :maestrano do
|
5
|
-
scope module: :rails do
|
6
|
-
# GET /maestrano/metadata
|
7
|
-
get '/metadata', to: 'metadata#index'
|
8
|
-
|
9
|
-
# GET /maestrano/metadata/mytenant
|
10
|
-
get '/metadata/:tenant', to: 'metadata#index'
|
11
|
-
end
|
12
|
-
|
13
5
|
namespace :auth do
|
14
6
|
resources :saml, only:[] do
|
15
7
|
# GET /maestrano/auth/saml/init
|
@@ -42,4 +34,4 @@ module ActionDispatch::Routing
|
|
42
34
|
end
|
43
35
|
end
|
44
36
|
end
|
45
|
-
end
|
37
|
+
end
|