@abyss-project/main 42.7.0 → 43.1.0
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.
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/oauth-app.constants.d.ts +3 -6
- package/dist/constants/oauth-app.constants.js +9 -42
- package/dist/constants/oauth-app.constants.js.map +1 -1
- package/dist/constants/oauth-scope-catalogue.d.ts +215 -0
- package/dist/constants/oauth-scope-catalogue.js +3164 -0
- package/dist/constants/oauth-scope-catalogue.js.map +1 -0
- package/dist/constants/tests/oauth-app.constants.spec.js +31 -54
- package/dist/constants/tests/oauth-app.constants.spec.js.map +1 -1
- package/dist/constants/tests/oauth-scope-catalogue.spec.js +198 -0
- package/dist/constants/tests/oauth-scope-catalogue.spec.js.map +1 -0
- package/dist/constants/tests/oauth-scope-positions.snapshot.d.ts +39 -0
- package/dist/constants/tests/oauth-scope-positions.snapshot.js +225 -0
- package/dist/constants/tests/oauth-scope-positions.snapshot.js.map +1 -0
- package/dist/server/index.d.ts +5 -2
- package/dist/server/index.js +5 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/oauth-access-token.util.d.ts +4 -1
- package/dist/server/oauth-access-token.util.js +22 -5
- package/dist/server/oauth-access-token.util.js.map +1 -1
- package/dist/server/oauth-claim-format.error.d.ts +4 -0
- package/dist/server/oauth-claim-format.error.js +19 -0
- package/dist/server/oauth-claim-format.error.js.map +1 -0
- package/dist/server/oauth-perimeter-claim.util.d.ts +14 -0
- package/dist/server/oauth-perimeter-claim.util.js +109 -0
- package/dist/server/oauth-perimeter-claim.util.js.map +1 -0
- package/dist/server/oauth-perimeter.util.d.ts +31 -0
- package/dist/server/oauth-perimeter.util.js +97 -0
- package/dist/server/oauth-perimeter.util.js.map +1 -0
- package/dist/server/oauth-route-access.util.d.ts +56 -0
- package/dist/server/oauth-route-access.util.js +65 -0
- package/dist/server/oauth-route-access.util.js.map +1 -0
- package/dist/server/oauth-scope-bits.util.d.ts +9 -0
- package/dist/server/oauth-scope-bits.util.js +82 -0
- package/dist/server/oauth-scope-bits.util.js.map +1 -0
- package/dist/server/tests/oauth-access-token.util.spec.js +29 -5
- package/dist/server/tests/oauth-access-token.util.spec.js.map +1 -1
- package/dist/server/tests/oauth-perimeter-claim.util.spec.js +148 -0
- package/dist/server/tests/oauth-perimeter-claim.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-perimeter.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-perimeter.util.spec.js +215 -0
- package/dist/server/tests/oauth-perimeter.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-route-access.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-route-access.util.spec.js +115 -0
- package/dist/server/tests/oauth-route-access.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-scope-bits.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-scope-bits.util.spec.js +72 -0
- package/dist/server/tests/oauth-scope-bits.util.spec.js.map +1 -0
- package/dist/translate/en.translate.d.ts +8 -0
- package/dist/translate/en.translate.js +8 -0
- package/dist/translate/en.translate.js.map +1 -1
- package/dist/translate/fr.translate.d.ts +8 -0
- package/dist/translate/fr.translate.js +8 -0
- package/dist/translate/fr.translate.js.map +1 -1
- package/dist/types/enum/email-type.enum.d.ts +2 -0
- package/dist/types/enum/email-type.enum.js +2 -0
- package/dist/types/enum/email-type.enum.js.map +1 -1
- package/dist/types/enum/form-file-upload-refusal-reason.enum.d.ts +4 -0
- package/dist/types/enum/form-file-upload-refusal-reason.enum.js +9 -0
- package/dist/types/enum/form-file-upload-refusal-reason.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/oauth-app.enum.d.ts +0 -21
- package/dist/types/enum/oauth-app.enum.js +1 -24
- package/dist/types/enum/oauth-app.enum.js.map +1 -1
- package/dist/types/enum/oauth-scope.enum.d.ts +74 -0
- package/dist/types/enum/oauth-scope.enum.js +86 -0
- package/dist/types/enum/oauth-scope.enum.js.map +1 -0
- package/dist/types/enum/user-notification-category.enum.js +2 -0
- package/dist/types/enum/user-notification-category.enum.js.map +1 -1
- package/dist/types/enum/user-notification-content-type.enum.d.ts +24 -0
- package/dist/types/enum/user-notification-content-type.enum.js +3 -1
- package/dist/types/enum/user-notification-content-type.enum.js.map +1 -1
- package/dist/types/interface/api/requests/index.d.ts +1 -0
- package/dist/types/interface/api/requests/index.js +1 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/oauth-perimeter.request.d.ts +30 -0
- package/dist/types/interface/api/requests/oauth-perimeter.request.js +5 -0
- package/dist/types/interface/api/requests/oauth-perimeter.request.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +1 -0
- package/dist/types/interface/api/responses/index.js +1 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/oauth-perimeter.response.d.ts +23 -0
- package/dist/types/interface/api/responses/oauth-perimeter.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-perimeter.response.js.map +1 -0
- package/package.json +15 -10
- package/dist/server/oauth-no-app-token.util.d.ts +0 -7
- package/dist/server/oauth-no-app-token.util.js +0 -14
- package/dist/server/oauth-no-app-token.util.js.map +0 -1
- package/dist/server/oauth-request-guard.util.d.ts +0 -27
- package/dist/server/oauth-request-guard.util.js +0 -34
- package/dist/server/oauth-request-guard.util.js.map +0 -1
- package/dist/server/tests/oauth-no-app-token.util.spec.js +0 -40
- package/dist/server/tests/oauth-no-app-token.util.spec.js.map +0 -1
- package/dist/server/tests/oauth-request-guard.util.spec.js +0 -80
- package/dist/server/tests/oauth-request-guard.util.spec.js.map +0 -1
- /package/dist/{server/tests/oauth-no-app-token.util.spec.d.ts → constants/tests/oauth-scope-catalogue.spec.d.ts} +0 -0
- /package/dist/server/tests/{oauth-request-guard.util.spec.d.ts → oauth-perimeter-claim.util.spec.d.ts} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const PUBLISHED_OAUTH_SCOPE_POSITIONS: {
|
|
2
|
+
readonly version: 1;
|
|
3
|
+
readonly positions: {
|
|
4
|
+
readonly main: readonly ["main:organization.read", "main:usage.read", "openid", "profile", "email"];
|
|
5
|
+
readonly cloud: readonly ["cloud:space.read", "cloud:usage.read", "cloud:file.read", "cloud:file.content", "cloud:version.read", "cloud:activity.read", "cloud:share.read", "cloud:gallery.read", "cloud:file.write", "cloud:file.delete", "cloud:version.write", "cloud:encryption.run", "cloud:share.write", "cloud:gallery.write"];
|
|
6
|
+
readonly beam: readonly ["beam:transfer.read", "beam:recipient.read", "beam:transfer.content", "beam:transfer.write", "beam:recipient.send", "beam:transfer.delete"];
|
|
7
|
+
readonly console: readonly ["console:project.read", "console:vault.read", "console:vault.content", "console:vault.access.read", "console:smtp.read"];
|
|
8
|
+
readonly crypt: readonly ["crypt:usage.read", "crypt:encryption.run", "crypt:decryption.run"];
|
|
9
|
+
readonly extract: readonly ["extract:file.read", "extract:file.content", "extract:extraction.read", "extract:extraction.content", "extract:extraction.run", "extract:extraction.write", "extract:template.read", "extract:template.write", "extract:usage.read", "extract:feedback.read", "extract:feedback.send", "extract:delivery.read", "extract:delivery.content", "extract:delivery.write"];
|
|
10
|
+
readonly form: readonly ["form:form.read", "form:form.content", "form:form.write", "form:form.delete", "form:submission.read", "form:submission.content", "form:submission.write", "form:submission.delete", "form:delivery.read", "form:delivery.content", "form:delivery.write"];
|
|
11
|
+
readonly memories: readonly ["memories:event.read", "memories:media.read", "memories:media.content", "memories:memory.read", "memories:rsvp.read", "memories:notification.read", "memories:event.write", "memories:event.delete", "memories:media.write", "memories:media.delete", "memories:comment.write", "memories:moderation.write", "memories:memory.write", "memories:export.run", "memories:notification.write"];
|
|
12
|
+
readonly monitor: readonly ["monitor:application.read", "monitor:audit.read", "monitor:sensitive-data.read", "monitor:application.write", "monitor:release.write", "monitor:view.write", "monitor:log.read", "monitor:metric.read", "monitor:incident.read", "monitor:incident.write", "monitor:alert.read", "monitor:sentinel.read", "monitor:oncall.read", "monitor:notification.read", "monitor:delivery.read", "monitor:delivery.content", "monitor:delivery.write", "monitor:rum.read", "monitor:visitor.read", "monitor:feedback.read", "monitor:subscriber.read", "monitor:status-page.read"];
|
|
13
|
+
readonly probe: readonly ["probe:scan.read", "probe:scan.run", "probe:delivery.read", "probe:delivery.content", "probe:delivery.write"];
|
|
14
|
+
readonly reflex: readonly ["reflex:service.read", "reflex:run.read", "reflex:function.read"];
|
|
15
|
+
readonly spotlight: readonly ["spotlight:project.read", "spotlight:project.content", "spotlight:analytics.read", "spotlight:project.write", "spotlight:post.write", "spotlight:project.delete", "spotlight:follower.read", "spotlight:following.read", "spotlight:following.write"];
|
|
16
|
+
readonly storage: readonly ["storage:usage.read", "storage:file.read", "storage:file.content", "storage:file.write", "storage:file.delete", "storage:encryption.run", "storage:store.read", "storage:store.write", "storage:delivery.read", "storage:delivery.content", "storage:delivery.write"];
|
|
17
|
+
readonly training: readonly ["training:program.read", "training:program.write", "training:session.write", "training:summary.read", "training:history.read"];
|
|
18
|
+
readonly workspace: readonly ["workspace:atlas.read", "workspace:atlas.content", "workspace:atlas.write", "workspace:atlas.delete", "workspace:board.read", "workspace:board.content", "workspace:board.write", "workspace:board.delete", "workspace:draw.read", "workspace:draw.write", "workspace:draw.delete", "workspace:retrospective.read", "workspace:retrospective.write", "workspace:retrospective.delete", "workspace:overview.read", "workspace:tag.read", "workspace:tag.write", "workspace:desk.read", "workspace:desk.note.read", "workspace:desk.content", "workspace:desk.write", "workspace:desk.send", "workspace:desk.approval.write", "workspace:desk.delete", "workspace:desk.config.write"];
|
|
19
|
+
readonly banking: readonly ["banking:account.read", "banking:account.write", "banking:account.delete", "banking:transaction.read", "banking:transaction.write", "banking:transaction.send", "banking:category.read", "banking:category.write", "banking:document.read", "banking:document.content", "banking:document.write", "banking:invoice.read", "banking:invoice.write", "banking:approval.write", "banking:contact.read", "banking:contact.write", "banking:budget.read", "banking:budget.write", "banking:dashboard.read", "banking:dashboard.write", "banking:report.read", "banking:declaration.read", "banking:declaration.write", "banking:settings.read", "banking:settings.write", "banking:scoring.read", "banking:scoring.write"];
|
|
20
|
+
};
|
|
21
|
+
readonly retired: {
|
|
22
|
+
readonly main: readonly [];
|
|
23
|
+
readonly cloud: readonly [];
|
|
24
|
+
readonly beam: readonly [];
|
|
25
|
+
readonly console: readonly [];
|
|
26
|
+
readonly crypt: readonly [];
|
|
27
|
+
readonly extract: readonly [];
|
|
28
|
+
readonly form: readonly [];
|
|
29
|
+
readonly memories: readonly [];
|
|
30
|
+
readonly monitor: readonly [];
|
|
31
|
+
readonly probe: readonly [];
|
|
32
|
+
readonly reflex: readonly [];
|
|
33
|
+
readonly spotlight: readonly [];
|
|
34
|
+
readonly storage: readonly [];
|
|
35
|
+
readonly training: readonly [];
|
|
36
|
+
readonly workspace: readonly [];
|
|
37
|
+
readonly banking: readonly [];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PUBLISHED_OAUTH_SCOPE_POSITIONS = void 0;
|
|
4
|
+
exports.PUBLISHED_OAUTH_SCOPE_POSITIONS = {
|
|
5
|
+
version: 1,
|
|
6
|
+
positions: {
|
|
7
|
+
main: ['main:organization.read', 'main:usage.read', 'openid', 'profile', 'email'],
|
|
8
|
+
cloud: [
|
|
9
|
+
'cloud:space.read',
|
|
10
|
+
'cloud:usage.read',
|
|
11
|
+
'cloud:file.read',
|
|
12
|
+
'cloud:file.content',
|
|
13
|
+
'cloud:version.read',
|
|
14
|
+
'cloud:activity.read',
|
|
15
|
+
'cloud:share.read',
|
|
16
|
+
'cloud:gallery.read',
|
|
17
|
+
'cloud:file.write',
|
|
18
|
+
'cloud:file.delete',
|
|
19
|
+
'cloud:version.write',
|
|
20
|
+
'cloud:encryption.run',
|
|
21
|
+
'cloud:share.write',
|
|
22
|
+
'cloud:gallery.write',
|
|
23
|
+
],
|
|
24
|
+
beam: [
|
|
25
|
+
'beam:transfer.read',
|
|
26
|
+
'beam:recipient.read',
|
|
27
|
+
'beam:transfer.content',
|
|
28
|
+
'beam:transfer.write',
|
|
29
|
+
'beam:recipient.send',
|
|
30
|
+
'beam:transfer.delete',
|
|
31
|
+
],
|
|
32
|
+
console: [
|
|
33
|
+
'console:project.read',
|
|
34
|
+
'console:vault.read',
|
|
35
|
+
'console:vault.content',
|
|
36
|
+
'console:vault.access.read',
|
|
37
|
+
'console:smtp.read',
|
|
38
|
+
],
|
|
39
|
+
crypt: ['crypt:usage.read', 'crypt:encryption.run', 'crypt:decryption.run'],
|
|
40
|
+
extract: [
|
|
41
|
+
'extract:file.read',
|
|
42
|
+
'extract:file.content',
|
|
43
|
+
'extract:extraction.read',
|
|
44
|
+
'extract:extraction.content',
|
|
45
|
+
'extract:extraction.run',
|
|
46
|
+
'extract:extraction.write',
|
|
47
|
+
'extract:template.read',
|
|
48
|
+
'extract:template.write',
|
|
49
|
+
'extract:usage.read',
|
|
50
|
+
'extract:feedback.read',
|
|
51
|
+
'extract:feedback.send',
|
|
52
|
+
'extract:delivery.read',
|
|
53
|
+
'extract:delivery.content',
|
|
54
|
+
'extract:delivery.write',
|
|
55
|
+
],
|
|
56
|
+
form: [
|
|
57
|
+
'form:form.read',
|
|
58
|
+
'form:form.content',
|
|
59
|
+
'form:form.write',
|
|
60
|
+
'form:form.delete',
|
|
61
|
+
'form:submission.read',
|
|
62
|
+
'form:submission.content',
|
|
63
|
+
'form:submission.write',
|
|
64
|
+
'form:submission.delete',
|
|
65
|
+
'form:delivery.read',
|
|
66
|
+
'form:delivery.content',
|
|
67
|
+
'form:delivery.write',
|
|
68
|
+
],
|
|
69
|
+
memories: [
|
|
70
|
+
'memories:event.read',
|
|
71
|
+
'memories:media.read',
|
|
72
|
+
'memories:media.content',
|
|
73
|
+
'memories:memory.read',
|
|
74
|
+
'memories:rsvp.read',
|
|
75
|
+
'memories:notification.read',
|
|
76
|
+
'memories:event.write',
|
|
77
|
+
'memories:event.delete',
|
|
78
|
+
'memories:media.write',
|
|
79
|
+
'memories:media.delete',
|
|
80
|
+
'memories:comment.write',
|
|
81
|
+
'memories:moderation.write',
|
|
82
|
+
'memories:memory.write',
|
|
83
|
+
'memories:export.run',
|
|
84
|
+
'memories:notification.write',
|
|
85
|
+
],
|
|
86
|
+
monitor: [
|
|
87
|
+
'monitor:application.read',
|
|
88
|
+
'monitor:audit.read',
|
|
89
|
+
'monitor:sensitive-data.read',
|
|
90
|
+
'monitor:application.write',
|
|
91
|
+
'monitor:release.write',
|
|
92
|
+
'monitor:view.write',
|
|
93
|
+
'monitor:log.read',
|
|
94
|
+
'monitor:metric.read',
|
|
95
|
+
'monitor:incident.read',
|
|
96
|
+
'monitor:incident.write',
|
|
97
|
+
'monitor:alert.read',
|
|
98
|
+
'monitor:sentinel.read',
|
|
99
|
+
'monitor:oncall.read',
|
|
100
|
+
'monitor:notification.read',
|
|
101
|
+
'monitor:delivery.read',
|
|
102
|
+
'monitor:delivery.content',
|
|
103
|
+
'monitor:delivery.write',
|
|
104
|
+
'monitor:rum.read',
|
|
105
|
+
'monitor:visitor.read',
|
|
106
|
+
'monitor:feedback.read',
|
|
107
|
+
'monitor:subscriber.read',
|
|
108
|
+
'monitor:status-page.read',
|
|
109
|
+
],
|
|
110
|
+
probe: [
|
|
111
|
+
'probe:scan.read',
|
|
112
|
+
'probe:scan.run',
|
|
113
|
+
'probe:delivery.read',
|
|
114
|
+
'probe:delivery.content',
|
|
115
|
+
'probe:delivery.write',
|
|
116
|
+
],
|
|
117
|
+
reflex: ['reflex:service.read', 'reflex:run.read', 'reflex:function.read'],
|
|
118
|
+
spotlight: [
|
|
119
|
+
'spotlight:project.read',
|
|
120
|
+
'spotlight:project.content',
|
|
121
|
+
'spotlight:analytics.read',
|
|
122
|
+
'spotlight:project.write',
|
|
123
|
+
'spotlight:post.write',
|
|
124
|
+
'spotlight:project.delete',
|
|
125
|
+
'spotlight:follower.read',
|
|
126
|
+
'spotlight:following.read',
|
|
127
|
+
'spotlight:following.write',
|
|
128
|
+
],
|
|
129
|
+
storage: [
|
|
130
|
+
'storage:usage.read',
|
|
131
|
+
'storage:file.read',
|
|
132
|
+
'storage:file.content',
|
|
133
|
+
'storage:file.write',
|
|
134
|
+
'storage:file.delete',
|
|
135
|
+
'storage:encryption.run',
|
|
136
|
+
'storage:store.read',
|
|
137
|
+
'storage:store.write',
|
|
138
|
+
'storage:delivery.read',
|
|
139
|
+
'storage:delivery.content',
|
|
140
|
+
'storage:delivery.write',
|
|
141
|
+
],
|
|
142
|
+
training: [
|
|
143
|
+
'training:program.read',
|
|
144
|
+
'training:program.write',
|
|
145
|
+
'training:session.write',
|
|
146
|
+
'training:summary.read',
|
|
147
|
+
'training:history.read',
|
|
148
|
+
],
|
|
149
|
+
workspace: [
|
|
150
|
+
'workspace:atlas.read',
|
|
151
|
+
'workspace:atlas.content',
|
|
152
|
+
'workspace:atlas.write',
|
|
153
|
+
'workspace:atlas.delete',
|
|
154
|
+
'workspace:board.read',
|
|
155
|
+
'workspace:board.content',
|
|
156
|
+
'workspace:board.write',
|
|
157
|
+
'workspace:board.delete',
|
|
158
|
+
'workspace:draw.read',
|
|
159
|
+
'workspace:draw.write',
|
|
160
|
+
'workspace:draw.delete',
|
|
161
|
+
'workspace:retrospective.read',
|
|
162
|
+
'workspace:retrospective.write',
|
|
163
|
+
'workspace:retrospective.delete',
|
|
164
|
+
'workspace:overview.read',
|
|
165
|
+
'workspace:tag.read',
|
|
166
|
+
'workspace:tag.write',
|
|
167
|
+
'workspace:desk.read',
|
|
168
|
+
'workspace:desk.note.read',
|
|
169
|
+
'workspace:desk.content',
|
|
170
|
+
'workspace:desk.write',
|
|
171
|
+
'workspace:desk.send',
|
|
172
|
+
'workspace:desk.approval.write',
|
|
173
|
+
'workspace:desk.delete',
|
|
174
|
+
'workspace:desk.config.write',
|
|
175
|
+
],
|
|
176
|
+
banking: [
|
|
177
|
+
'banking:account.read',
|
|
178
|
+
'banking:account.write',
|
|
179
|
+
'banking:account.delete',
|
|
180
|
+
'banking:transaction.read',
|
|
181
|
+
'banking:transaction.write',
|
|
182
|
+
'banking:transaction.send',
|
|
183
|
+
'banking:category.read',
|
|
184
|
+
'banking:category.write',
|
|
185
|
+
'banking:document.read',
|
|
186
|
+
'banking:document.content',
|
|
187
|
+
'banking:document.write',
|
|
188
|
+
'banking:invoice.read',
|
|
189
|
+
'banking:invoice.write',
|
|
190
|
+
'banking:approval.write',
|
|
191
|
+
'banking:contact.read',
|
|
192
|
+
'banking:contact.write',
|
|
193
|
+
'banking:budget.read',
|
|
194
|
+
'banking:budget.write',
|
|
195
|
+
'banking:dashboard.read',
|
|
196
|
+
'banking:dashboard.write',
|
|
197
|
+
'banking:report.read',
|
|
198
|
+
'banking:declaration.read',
|
|
199
|
+
'banking:declaration.write',
|
|
200
|
+
'banking:settings.read',
|
|
201
|
+
'banking:settings.write',
|
|
202
|
+
'banking:scoring.read',
|
|
203
|
+
'banking:scoring.write',
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
retired: {
|
|
207
|
+
main: [],
|
|
208
|
+
cloud: [],
|
|
209
|
+
beam: [],
|
|
210
|
+
console: [],
|
|
211
|
+
crypt: [],
|
|
212
|
+
extract: [],
|
|
213
|
+
form: [],
|
|
214
|
+
memories: [],
|
|
215
|
+
monitor: [],
|
|
216
|
+
probe: [],
|
|
217
|
+
reflex: [],
|
|
218
|
+
spotlight: [],
|
|
219
|
+
storage: [],
|
|
220
|
+
training: [],
|
|
221
|
+
workspace: [],
|
|
222
|
+
banking: [],
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=oauth-scope-positions.snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-scope-positions.snapshot.js","sourceRoot":"","sources":["../../../src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uBAAuB;YACvB,8BAA8B;YAC9B,+BAA+B;YAC/B,gCAAgC;YAChC,yBAAyB;YACzB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,0BAA0B;YAC1B,wBAAwB;YACxB,sBAAsB;YACtB,qBAAqB;YACrB,+BAA+B;YAC/B,uBAAuB;YACvB,6BAA6B;SAC9B;QACD,OAAO,EAAE;YACP,sBAAsB;YACtB,uBAAuB;YACvB,wBAAwB;YACxB,0BAA0B;YAC1B,2BAA2B;YAC3B,0BAA0B;YAC1B,uBAAuB;YACvB,wBAAwB;YACxB,uBAAuB;YACvB,0BAA0B;YAC1B,wBAAwB;YACxB,sBAAsB;YACtB,uBAAuB;YACvB,wBAAwB;YACxB,sBAAsB;YACtB,uBAAuB;YACvB,qBAAqB;YACrB,sBAAsB;YACtB,wBAAwB;YACxB,yBAAyB;YACzB,qBAAqB;YACrB,0BAA0B;YAC1B,2BAA2B;YAC3B,uBAAuB;YACvB,wBAAwB;YACxB,sBAAsB;YACtB,uBAAuB;SACxB;KACF;IACD,OAAO,EAAE;QACP,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;KACZ;CACO,CAAC"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './safe-url.util';
|
|
2
2
|
export * from './api-cors.util';
|
|
3
3
|
export * from './oauth-access-token.util';
|
|
4
|
-
export * from './oauth-
|
|
5
|
-
export * from './oauth-
|
|
4
|
+
export * from './oauth-claim-format.error';
|
|
5
|
+
export * from './oauth-scope-bits.util';
|
|
6
|
+
export * from './oauth-perimeter-claim.util';
|
|
7
|
+
export * from './oauth-route-access.util';
|
|
8
|
+
export * from './oauth-perimeter.util';
|
|
6
9
|
export * from './after-commit-emit.util';
|
|
7
10
|
export * from './encrypt-secret.util';
|
|
8
11
|
export * from './demo';
|
package/dist/server/index.js
CHANGED
|
@@ -17,8 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./safe-url.util"), exports);
|
|
18
18
|
__exportStar(require("./api-cors.util"), exports);
|
|
19
19
|
__exportStar(require("./oauth-access-token.util"), exports);
|
|
20
|
-
__exportStar(require("./oauth-
|
|
21
|
-
__exportStar(require("./oauth-
|
|
20
|
+
__exportStar(require("./oauth-claim-format.error"), exports);
|
|
21
|
+
__exportStar(require("./oauth-scope-bits.util"), exports);
|
|
22
|
+
__exportStar(require("./oauth-perimeter-claim.util"), exports);
|
|
23
|
+
__exportStar(require("./oauth-route-access.util"), exports);
|
|
24
|
+
__exportStar(require("./oauth-perimeter.util"), exports);
|
|
22
25
|
__exportStar(require("./after-commit-emit.util"), exports);
|
|
23
26
|
__exportStar(require("./encrypt-secret.util"), exports);
|
|
24
27
|
__exportStar(require("./demo"), exports);
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,kDAAgC;AAIhC,kDAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,kDAAgC;AAIhC,kDAAgC;AAMhC,4DAA0C;AAC1C,6DAA2C;AAC3C,0DAAwC;AACxC,+DAA6C;AAC7C,4DAA0C;AAC1C,yDAAuC;AAGvC,2DAAyC;AAKzC,wDAAsC;AAGtC,yCAAuB;AAIvB,gEAA8C;AAC9C,2DAAyC;AACzC,wDAAsC;AAGtC,yDAAuC;AAGvC,sDAAoC;AAKpC,4CAA0B;AAK1B,iDAA+B;AAI/B,+DAA6C"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { KeyObject } from 'crypto';
|
|
2
|
+
import { OAuthScopeName } from '../constants/oauth-scope-catalogue';
|
|
2
3
|
import type { OAuthAudience } from '../types/enum/oauth-app.enum';
|
|
4
|
+
import { OAuthPerimeterEntries } from './oauth-perimeter-claim.util';
|
|
3
5
|
export declare const SESSION_JWT_ALGORITHMS: readonly ["RS256"];
|
|
4
6
|
export interface OAuthAccessTokenClaims {
|
|
5
7
|
sub: string;
|
|
6
8
|
clientId: string;
|
|
7
|
-
scopes:
|
|
9
|
+
scopes: OAuthScopeName[];
|
|
10
|
+
perimeter: OAuthPerimeterEntries;
|
|
8
11
|
audiences: string[];
|
|
9
12
|
jti: string;
|
|
10
13
|
expiresAt: Date;
|
|
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.verifyOAuthAccessToken = exports.assertSessionTokenNotOAuth = exports.isOAuthAccessToken = exports.OAuthAccessTokenError = exports.OAuthAccessTokenErrorReason = exports.SESSION_JWT_ALGORITHMS = void 0;
|
|
7
7
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
8
8
|
const oauth_app_constants_1 = require("../constants/oauth-app.constants");
|
|
9
|
+
const oauth_claim_format_error_1 = require("./oauth-claim-format.error");
|
|
10
|
+
const oauth_perimeter_claim_util_1 = require("./oauth-perimeter-claim.util");
|
|
11
|
+
const oauth_scope_bits_util_1 = require("./oauth-scope-bits.util");
|
|
9
12
|
exports.SESSION_JWT_ALGORITHMS = ['RS256'];
|
|
10
13
|
var OAuthAccessTokenErrorReason;
|
|
11
14
|
(function (OAuthAccessTokenErrorReason) {
|
|
@@ -78,18 +81,32 @@ const verifyOAuthAccessToken = (token, options) => {
|
|
|
78
81
|
if (sessionClaim !== undefined) {
|
|
79
82
|
throw invalidToken(`an access token never carries ${sessionClaim}`);
|
|
80
83
|
}
|
|
81
|
-
const { sub, client_id: clientId,
|
|
84
|
+
const { sub, client_id: clientId, jti, exp, aud } = payload;
|
|
82
85
|
if (!isNonEmptyString(sub) ||
|
|
83
86
|
!isNonEmptyString(clientId) ||
|
|
84
|
-
typeof scope !== 'string' ||
|
|
85
87
|
!isNonEmptyString(jti) ||
|
|
86
|
-
typeof exp !== 'number'
|
|
87
|
-
|
|
88
|
+
typeof exp !== 'number' ||
|
|
89
|
+
!(oauth_scope_bits_util_1.OAUTH_SCOPE_CLAIM in payload) ||
|
|
90
|
+
!(oauth_perimeter_claim_util_1.OAUTH_PERIMETER_CLAIM in payload)) {
|
|
91
|
+
throw invalidToken(`sub, client_id, jti, exp, ${oauth_scope_bits_util_1.OAUTH_SCOPE_CLAIM} and ${oauth_perimeter_claim_util_1.OAUTH_PERIMETER_CLAIM} are required`);
|
|
92
|
+
}
|
|
93
|
+
let scopes;
|
|
94
|
+
let perimeter;
|
|
95
|
+
try {
|
|
96
|
+
scopes = (0, oauth_scope_bits_util_1.decodeOAuthScopes)(payload[oauth_scope_bits_util_1.OAUTH_SCOPE_CLAIM]);
|
|
97
|
+
perimeter = (0, oauth_perimeter_claim_util_1.decodeOAuthPerimeter)(payload[oauth_perimeter_claim_util_1.OAUTH_PERIMETER_CLAIM]);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
if (error instanceof oauth_claim_format_error_1.OAuthClaimFormatError) {
|
|
101
|
+
throw invalidToken(error.message);
|
|
102
|
+
}
|
|
103
|
+
throw error;
|
|
88
104
|
}
|
|
89
105
|
return {
|
|
90
106
|
sub,
|
|
91
107
|
clientId,
|
|
92
|
-
scopes
|
|
108
|
+
scopes,
|
|
109
|
+
perimeter,
|
|
93
110
|
audiences: Array.isArray(aud) ? aud : aud === undefined ? [] : [aud],
|
|
94
111
|
jti,
|
|
95
112
|
expiresAt: new Date(exp * 1000),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-access-token.util.js","sourceRoot":"","sources":["../../src/server/oauth-access-token.util.ts"],"names":[],"mappings":";;;;;;AAWA,gEAA+B;AAC/B,0EAA+E;
|
|
1
|
+
{"version":3,"file":"oauth-access-token.util.js","sourceRoot":"","sources":["../../src/server/oauth-access-token.util.ts"],"names":[],"mappings":";;;;;;AAWA,gEAA+B;AAC/B,0EAA+E;AAG/E,yEAAmE;AACnE,6EAIsC;AACtC,mEAA+E;AAGlE,QAAA,sBAAsB,GAAG,CAAC,OAAO,CAAU,CAAC;AAiBzD,IAAY,2BAMX;AAND,WAAY,2BAA2B;IAErC,8DAA+B,CAAA;IAC/B,kDAAmB,CAAA;IAEnB,gEAAiC,CAAA;AACnC,CAAC,EANW,2BAA2B,2CAA3B,2BAA2B,QAMtC;AAED,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAA4B,MAAmC,EAAE,OAAe;QAC9E,KAAK,CAAC,OAAO,CAAC,CAAC;QADW,WAAM,GAAN,MAAM,CAA6B;QAE7D,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC;AAUD,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU,CAAC;AAGrD,MAAM,gCAAgC,GAAG,sBAAsB,CAAC;AAEhE,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC3D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAEhD,MAAM,YAAY,GAAG,CAAC,OAAe,EAAyB,EAAE,CAC9D,IAAI,qBAAqB,CAAC,2BAA2B,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAOzE,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAW,EAAE;IAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,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AG,KAAK,QAAQ;QACvB,CAAC,CAAC,yCAAiB,IAAI,OAAO,CAAC;QAC/B,CAAC,CAAC,kDAAqB,IAAI,OAAO,CAAC,EACnC,CAAC;QACD,MAAM,YAAY,CAChB,6BAA6B,yCAAiB,QAAQ,kDAAqB,eAAe,CAC3F,CAAC;IACJ,CAAC;IACD,IAAI,MAAwB,CAAC;IAC7B,IAAI,SAAgC,CAAC;IACrC,IAAI,CAAC;QACH,MAAM,GAAG,IAAA,yCAAiB,EAAC,OAAO,CAAC,yCAAiB,CAAC,CAAC,CAAC;QACvD,SAAS,GAAG,IAAA,iDAAoB,EAAC,OAAO,CAAC,kDAAqB,CAAC,CAAC,CAAC;IACnE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,gDAAqB,EAAE,CAAC;YAC3C,MAAM,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO;QACL,GAAG;QACH,QAAQ;QACR,MAAM;QACN,SAAS;QACT,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QACpE,GAAG;QACH,SAAS,EAAE,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;KAChC,CAAC;AACJ,CAAC,CAAC;AAxDW,QAAA,sBAAsB,0BAwDjC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeBase64Url = exports.OAuthClaimFormatError = void 0;
|
|
4
|
+
class OAuthClaimFormatError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'OAuthClaimFormatError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OAuthClaimFormatError = OAuthClaimFormatError;
|
|
11
|
+
const BASE64URL = /^[A-Za-z0-9_-]*$/;
|
|
12
|
+
const decodeBase64Url = (value, what) => {
|
|
13
|
+
if (!BASE64URL.test(value) || value.length % 4 === 1) {
|
|
14
|
+
throw new OAuthClaimFormatError(`${what} is not base64url`);
|
|
15
|
+
}
|
|
16
|
+
return Buffer.from(value, 'base64url');
|
|
17
|
+
};
|
|
18
|
+
exports.decodeBase64Url = decodeBase64Url;
|
|
19
|
+
//# sourceMappingURL=oauth-claim-format.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-claim-format.error.js","sourceRoot":"","sources":["../../src/server/oauth-claim-format.error.ts"],"names":[],"mappings":";;;AAIA,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC;AAED,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAG9B,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,IAAY,EAAU,EAAE;IACrE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,qBAAqB,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OAuthPerimeterUnit, OAuthService } from '../types/enum/oauth-scope.enum';
|
|
2
|
+
import type { IOAuthPerimeterEntryInput } from '../types/interface/api/requests/oauth-perimeter.request';
|
|
3
|
+
export declare const OAUTH_PERIMETER_CLAIM = "abyss_perimeter";
|
|
4
|
+
export type OAuthPerimeterClaim = Partial<Record<OAuthService, string[]>>;
|
|
5
|
+
export interface OAuthPerimeterEntry {
|
|
6
|
+
unit: OAuthPerimeterUnit;
|
|
7
|
+
id?: string;
|
|
8
|
+
environmentIds?: string[];
|
|
9
|
+
}
|
|
10
|
+
export type OAuthPerimeterEntries = Partial<Record<OAuthService, OAuthPerimeterEntry[]>>;
|
|
11
|
+
export declare const compactUuid: (uuid: string) => string;
|
|
12
|
+
export declare const expandCompactUuid: (compact: string) => string;
|
|
13
|
+
export declare const encodeOAuthPerimeter: (entries: readonly IOAuthPerimeterEntryInput[]) => OAuthPerimeterClaim;
|
|
14
|
+
export declare const decodeOAuthPerimeter: (claim: unknown) => OAuthPerimeterEntries;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeOAuthPerimeter = exports.encodeOAuthPerimeter = exports.expandCompactUuid = exports.compactUuid = exports.OAUTH_PERIMETER_CLAIM = void 0;
|
|
4
|
+
const oauth_scope_catalogue_1 = require("../constants/oauth-scope-catalogue");
|
|
5
|
+
const oauth_scope_enum_1 = require("../types/enum/oauth-scope.enum");
|
|
6
|
+
const oauth_claim_format_error_1 = require("./oauth-claim-format.error");
|
|
7
|
+
exports.OAUTH_PERIMETER_CLAIM = 'abyss_perimeter';
|
|
8
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9
|
+
const COMPACT_ID = /^[A-Za-z0-9_-]{22}$/;
|
|
10
|
+
const compactUuid = (uuid) => {
|
|
11
|
+
if (!UUID.test(uuid)) {
|
|
12
|
+
throw new Error(`${uuid} is not a UUID`);
|
|
13
|
+
}
|
|
14
|
+
return Buffer.from(uuid.replace(/-/g, ''), 'hex').toString('base64url');
|
|
15
|
+
};
|
|
16
|
+
exports.compactUuid = compactUuid;
|
|
17
|
+
const expandCompactUuid = (compact) => {
|
|
18
|
+
if (!COMPACT_ID.test(compact)) {
|
|
19
|
+
throw new oauth_claim_format_error_1.OAuthClaimFormatError(`${compact} is not a compact UUID`);
|
|
20
|
+
}
|
|
21
|
+
const hex = (0, oauth_claim_format_error_1.decodeBase64Url)(compact, 'a perimeter id').toString('hex');
|
|
22
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
23
|
+
};
|
|
24
|
+
exports.expandCompactUuid = expandCompactUuid;
|
|
25
|
+
const definitionOf = (service, unit) => oauth_scope_catalogue_1.OAUTH_SERVICE_PERIMETER[service].find((definition) => definition.unit === unit);
|
|
26
|
+
const UNIT_BY_CODE = new Map(Object.values(oauth_scope_enum_1.OAuthPerimeterUnit).map((unit) => [oauth_scope_catalogue_1.OAUTH_PERIMETER_UNIT_CODE[unit], unit]));
|
|
27
|
+
const SERVICES = new Set(Object.values(oauth_scope_enum_1.OAuthService));
|
|
28
|
+
const isService = (value) => SERVICES.has(value);
|
|
29
|
+
const encodeOAuthPerimeter = (entries) => {
|
|
30
|
+
const claim = {};
|
|
31
|
+
for (const entry of entries) {
|
|
32
|
+
const definition = definitionOf(entry.service, entry.unit);
|
|
33
|
+
if (definition === undefined) {
|
|
34
|
+
throw new Error(`${entry.unit} is not a perimeter unit of ${entry.service}`);
|
|
35
|
+
}
|
|
36
|
+
const code = oauth_scope_catalogue_1.OAUTH_PERIMETER_UNIT_CODE[entry.unit];
|
|
37
|
+
let reference;
|
|
38
|
+
if (definition.hasId) {
|
|
39
|
+
if (entry.id === null) {
|
|
40
|
+
throw new Error(`a ${entry.unit} entry of ${entry.service} needs an id`);
|
|
41
|
+
}
|
|
42
|
+
reference = `${code}:${(0, exports.compactUuid)(entry.id)}`;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (entry.id !== null) {
|
|
46
|
+
throw new Error(`a ${entry.unit} entry of ${entry.service} has no id`);
|
|
47
|
+
}
|
|
48
|
+
reference = code;
|
|
49
|
+
}
|
|
50
|
+
if (entry.environmentIds !== undefined) {
|
|
51
|
+
if (!definition.environments || !definition.hasId) {
|
|
52
|
+
throw new Error(`a ${entry.unit} entry of ${entry.service} has no environments`);
|
|
53
|
+
}
|
|
54
|
+
reference = `${reference}@${entry.environmentIds.map(exports.compactUuid).join('.')}`;
|
|
55
|
+
}
|
|
56
|
+
claim[entry.service] = [...(claim[entry.service] ?? []), reference];
|
|
57
|
+
}
|
|
58
|
+
return claim;
|
|
59
|
+
};
|
|
60
|
+
exports.encodeOAuthPerimeter = encodeOAuthPerimeter;
|
|
61
|
+
const decodeReference = (service, reference) => {
|
|
62
|
+
const at = reference.indexOf('@');
|
|
63
|
+
const head = at === -1 ? reference : reference.slice(0, at);
|
|
64
|
+
const colon = head.indexOf(':');
|
|
65
|
+
const code = colon === -1 ? head : head.slice(0, colon);
|
|
66
|
+
const unit = UNIT_BY_CODE.get(code);
|
|
67
|
+
const definition = unit === undefined ? undefined : definitionOf(service, unit);
|
|
68
|
+
if (unit === undefined || definition === undefined) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
if (definition.hasId !== (colon !== -1)) {
|
|
72
|
+
throw new oauth_claim_format_error_1.OAuthClaimFormatError(`${reference} does not match the unit ${unit} of ${service}`);
|
|
73
|
+
}
|
|
74
|
+
const entry = { unit };
|
|
75
|
+
if (colon !== -1) {
|
|
76
|
+
entry.id = (0, exports.expandCompactUuid)(head.slice(colon + 1));
|
|
77
|
+
}
|
|
78
|
+
if (at !== -1) {
|
|
79
|
+
if (!definition.environments || colon === -1) {
|
|
80
|
+
throw new oauth_claim_format_error_1.OAuthClaimFormatError(`${reference}: ${unit} of ${service} has no environments`);
|
|
81
|
+
}
|
|
82
|
+
entry.environmentIds = reference
|
|
83
|
+
.slice(at + 1)
|
|
84
|
+
.split('.')
|
|
85
|
+
.map(exports.expandCompactUuid);
|
|
86
|
+
}
|
|
87
|
+
return entry;
|
|
88
|
+
};
|
|
89
|
+
const decodeOAuthPerimeter = (claim) => {
|
|
90
|
+
if (typeof claim !== 'object' || claim === null || Array.isArray(claim)) {
|
|
91
|
+
throw new oauth_claim_format_error_1.OAuthClaimFormatError(`${exports.OAUTH_PERIMETER_CLAIM} is not an object`);
|
|
92
|
+
}
|
|
93
|
+
const entries = {};
|
|
94
|
+
for (const [service, references] of Object.entries(claim)) {
|
|
95
|
+
if (!Array.isArray(references) || references.some((value) => typeof value !== 'string')) {
|
|
96
|
+
throw new oauth_claim_format_error_1.OAuthClaimFormatError(`${exports.OAUTH_PERIMETER_CLAIM}.${service} is not a string list`);
|
|
97
|
+
}
|
|
98
|
+
if (!isService(service)) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
entries[service] = references.flatMap((reference) => {
|
|
102
|
+
const entry = decodeReference(service, reference);
|
|
103
|
+
return entry === undefined ? [] : [entry];
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return entries;
|
|
107
|
+
};
|
|
108
|
+
exports.decodeOAuthPerimeter = decodeOAuthPerimeter;
|
|
109
|
+
//# sourceMappingURL=oauth-perimeter-claim.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-perimeter-claim.util.js","sourceRoot":"","sources":["../../src/server/oauth-perimeter-claim.util.ts"],"names":[],"mappings":";;;AASA,8EAI4C;AAC5C,qEAAkF;AAElF,yEAAoF;AAGvE,QAAA,qBAAqB,GAAG,iBAAiB,CAAC;AAevD,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAC/E,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAGlC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAU,EAAE;IAClD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,gBAAg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C,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE,CAAC;YACxF,MAAM,IAAI,gDAAqB,CAAC,GAAG,6BAAqB,IAAI,OAAO,uBAAuB,CAAC,CAAC;QAC9F,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,SAAS;QACX,CAAC;QACD,OAAO,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE;YAC1D,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAlBW,QAAA,oBAAoB,wBAkB/B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OAuthPerimeterUnit, OAuthService } from '../types/enum/oauth-scope.enum';
|
|
2
|
+
import { OAuthAppLocals } from './oauth-route-access.util';
|
|
3
|
+
export interface OAuthPerimeterTarget {
|
|
4
|
+
service: OAuthService;
|
|
5
|
+
unit: OAuthPerimeterUnit;
|
|
6
|
+
id?: string;
|
|
7
|
+
organizationId?: string | null;
|
|
8
|
+
projectId?: string | null;
|
|
9
|
+
ownerUserId?: string | null;
|
|
10
|
+
environmentId?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface OAuthPerimeterListFilter {
|
|
13
|
+
userId: string;
|
|
14
|
+
personal: boolean;
|
|
15
|
+
sharedWithMe: boolean;
|
|
16
|
+
organizationIds: string[];
|
|
17
|
+
projectIds: string[];
|
|
18
|
+
ids: Partial<Record<OAuthPerimeterUnit, string[]>>;
|
|
19
|
+
environmentIds: Record<string, string[]>;
|
|
20
|
+
}
|
|
21
|
+
export declare class OAuthPerimeter {
|
|
22
|
+
private readonly locals;
|
|
23
|
+
private readonly userId;
|
|
24
|
+
private constructor();
|
|
25
|
+
static of(locals: OAuthAppLocals): OAuthPerimeter | null;
|
|
26
|
+
private entriesOf;
|
|
27
|
+
private entryHolds;
|
|
28
|
+
covers(target: OAuthPerimeterTarget): boolean;
|
|
29
|
+
assertCovers(target: OAuthPerimeterTarget): void;
|
|
30
|
+
listFilter(service: OAuthService): OAuthPerimeterListFilter;
|
|
31
|
+
}
|