@toa.io/extensions.exposition 1.0.0-alpha.10 → 1.0.0-alpha.11

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.
@@ -7,7 +7,7 @@ entity:
7
7
  role*: /^[a-zA-Z0-9]{1,16}(:[a-zA-Z0-9]{1,16}){0,8}$/
8
8
  delegator: string
9
9
  unique:
10
- unique: [identity, role]
10
+ role: [identity, role]
11
11
 
12
12
  operations:
13
13
  grant:
@@ -26,6 +26,7 @@ operations:
26
26
 
27
27
  receivers:
28
28
  identity.basic.principal: principal
29
+ identity.federation.principal: principal
29
30
 
30
31
  exposition:
31
32
  isolated: true
@@ -37,6 +37,7 @@ Feature: Identity Federation
37
37
  Then the following reply is sent:
38
38
  """
39
39
  200 OK
40
+
40
41
  id: ${{ User.id }}
41
42
  """
42
43
  # ensuring identity idempotency
@@ -49,6 +50,7 @@ Feature: Identity Federation
49
50
  Then the following reply is sent:
50
51
  """
51
52
  200 OK
53
+
52
54
  id: ${{ User.id }}
53
55
  """
54
56
 
@@ -151,3 +153,45 @@ Feature: Identity Federation
151
153
  """
152
154
  403 Forbidden
153
155
  """
156
+
157
+ Scenario: Granting a `system` role to a Principal
158
+ Given the `identity.federation` configuration:
159
+ """yaml
160
+ explicit_identity_creation: false
161
+ trust:
162
+ - issuer: http://localhost:44444
163
+ principal:
164
+ iss: http://localhost:44444
165
+ sub: root-mock-id
166
+ """
167
+ And the IDP token for root is issued
168
+ When the following request is received:
169
+ """
170
+ GET /identity/ HTTP/1.1
171
+ authorization: Bearer ${{ root.id_token }}
172
+ accept: application/yaml
173
+ content-type: application/yaml
174
+ """
175
+ # create an identity
176
+ Then the following reply is sent:
177
+ """
178
+ 200 OK
179
+ authorization: Token ${{ root.token }}
180
+
181
+ id: ${{ root.id }}
182
+ """
183
+ # check the role
184
+ When the following request is received:
185
+ """
186
+ GET /identity/ HTTP/1.1
187
+ accept: application/yaml
188
+ authorization: Token ${{ root.token }}
189
+ """
190
+ Then the following reply is sent:
191
+ """
192
+ 200 OK
193
+
194
+ id: ${{ root.id }}
195
+ roles:
196
+ - system
197
+ """
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.exposition",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.11",
4
4
  "description": "Toa Exposition",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -17,9 +17,9 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@toa.io/core": "1.0.0-alpha.10",
21
- "@toa.io/generic": "1.0.0-alpha.10",
22
- "@toa.io/schemas": "1.0.0-alpha.10",
20
+ "@toa.io/core": "1.0.0-alpha.11",
21
+ "@toa.io/generic": "1.0.0-alpha.11",
22
+ "@toa.io/schemas": "1.0.0-alpha.11",
23
23
  "bcryptjs": "2.4.3",
24
24
  "error-value": "0.3.0",
25
25
  "js-yaml": "4.1.0",
@@ -43,11 +43,11 @@
43
43
  "features": "cucumber-js"
44
44
  },
45
45
  "devDependencies": {
46
- "@toa.io/agent": "1.0.0-alpha.10",
47
- "@toa.io/extensions.storages": "1.0.0-alpha.10",
46
+ "@toa.io/agent": "1.0.0-alpha.11",
47
+ "@toa.io/extensions.storages": "1.0.0-alpha.11",
48
48
  "@types/bcryptjs": "2.4.3",
49
49
  "@types/cors": "2.8.13",
50
50
  "@types/negotiator": "0.6.1"
51
51
  },
52
- "gitHead": "472d582389fbfbfe6804cf01683276ce2cc45bf2"
52
+ "gitHead": "e343ac81eef12957cfa5e520119b1276b8ec0ad2"
53
53
  }