carta-controller 5.1.1 → 6.0.0-beta.1.0.3
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/.github/workflows/build.yml +43 -0
- package/COPYING.md +636 -0
- package/biome.jsonc +37 -0
- package/dist/auth/external.js +10 -4
- package/dist/auth/external.js.map +1 -1
- package/dist/auth/google.js +18 -11
- package/dist/auth/google.js.map +1 -1
- package/dist/auth/index.js +12 -12
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/ldap.js +6 -3
- package/dist/auth/ldap.js.map +1 -1
- package/dist/auth/local.js +30 -14
- package/dist/auth/local.js.map +1 -1
- package/dist/auth/oidc.js +95 -91
- package/dist/auth/oidc.js.map +1 -1
- package/dist/auth/oidcRefreshManager.js +21 -24
- package/dist/auth/oidcRefreshManager.js.map +1 -1
- package/dist/auth/pam.js +8 -5
- package/dist/auth/pam.js.map +1 -1
- package/dist/config.js +17 -16
- package/dist/controllerTests.js +10 -10
- package/dist/database.js +50 -22
- package/dist/index.js +24 -23
- package/dist/serverHandlers.js +70 -33
- package/dist/util.js +14 -5
- package/npm-shrinkwrap.json +4855 -20113
- package/package.json +12 -9
- package/public/dashboard.js +47 -48
- package/public/templated.css +155 -143
- package/test/auth.external.test.ts +19 -18
- package/.prettierrc.json +0 -18
package/public/templated.css
CHANGED
|
@@ -1,239 +1,251 @@
|
|
|
1
1
|
body {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
background-color: #f6f8fa;
|
|
3
|
+
font-family: "Roboto", sans-serif;
|
|
4
|
+
-webkit-font-smoothing: antialiased;
|
|
5
|
+
-moz-osx-font-smoothing: grayscale;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.center {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
margin: 0;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 50%;
|
|
12
|
+
left: 50%;
|
|
13
|
+
-ms-transform: translate(-50%, -50%);
|
|
14
|
+
transform: translate(-50%, -50%);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.blurred {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
transition: 100ms;
|
|
19
|
+
filter: blur(16px);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.signin-dialog {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
background-color: #ffffff;
|
|
24
|
+
width: 640px;
|
|
25
|
+
border-radius: 3px;
|
|
26
|
+
border: 0;
|
|
27
|
+
padding-top: 0;
|
|
28
|
+
margin: 20px auto 0 auto;
|
|
29
|
+
box-shadow:
|
|
30
|
+
0 0 15px 0 rgba(16, 22, 26, 0.05),
|
|
31
|
+
0 18px 46px 0 rgba(16, 22, 26, 0.05);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.logo {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
height: 90px;
|
|
38
|
+
padding-top: 30px;
|
|
39
|
+
margin: 0 -20px 15px 0;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
.spacer {
|
|
41
|
-
|
|
43
|
+
width: 0px;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.titletext {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
display: block;
|
|
48
|
+
text-align: left;
|
|
49
|
+
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Icons16, sans-serif;
|
|
50
|
+
margin: 23px 40px auto 10px;
|
|
51
|
+
color: #123a6f;
|
|
52
|
+
line-height: 21px;
|
|
53
|
+
font-size: 32px;
|
|
54
|
+
font-weight: bold;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
@supports (-moz-appearance:none) {
|
|
57
|
+
@supports (-moz-appearance: none) {
|
|
56
58
|
.titletext {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
width: 280%;
|
|
60
|
+
}
|
|
61
|
+
.spacer {
|
|
62
|
+
width: 70%;
|
|
63
|
+
}
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
.bodytext {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
text-align: center;
|
|
68
|
+
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Icons16, sans-serif;
|
|
69
|
+
margin: 30px auto 10px auto;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
line-height: 18px;
|
|
72
|
+
color: #505b66;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
.loggedin {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
margin: 20px auto -7px auto;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
.banner {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
padding: 20px;
|
|
82
|
+
display: block;
|
|
83
|
+
margin: 0 auto 0 auto;
|
|
84
|
+
vertical-align: top;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
.footer {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
input[type=text],
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
text-align: center;
|
|
89
|
+
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Icons16, sans-serif;
|
|
90
|
+
font-size: 13px;
|
|
91
|
+
line-height: 18px;
|
|
92
|
+
margin-top: 25px;
|
|
93
|
+
color: #000000;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
input[type="text"],
|
|
97
|
+
input[type="password"] {
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Icons16, sans-serif;
|
|
100
|
+
color: #245282;
|
|
101
|
+
width: 480px;
|
|
102
|
+
background-color: rgba(120, 131, 142, 0.4);
|
|
103
|
+
border: hidden;
|
|
104
|
+
border-radius: 3px;
|
|
105
|
+
padding: 15px 15px;
|
|
106
|
+
margin: 12px auto 0 auto;
|
|
107
|
+
display: inline-block;
|
|
108
|
+
box-sizing: border-box;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
::placeholder {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Icons16, sans-serif;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
color: #ffffff;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
button {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
border-radius: 3px;
|
|
119
|
+
text-transform: uppercase;
|
|
120
|
+
color: #ffffff;
|
|
121
|
+
font-size: 14px;
|
|
122
|
+
padding: 15px;
|
|
123
|
+
margin: 15px auto 0 auto;
|
|
124
|
+
border: 0;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
width: 220px;
|
|
127
|
+
transition: 100ms;
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
.button-signin {
|
|
128
|
-
|
|
131
|
+
background: #2c649e;
|
|
129
132
|
}
|
|
130
133
|
|
|
131
|
-
.button-signin:hover,
|
|
132
|
-
|
|
134
|
+
.button-signin:hover,
|
|
135
|
+
.button-signin:active,
|
|
136
|
+
.button-signin:focus {
|
|
137
|
+
background: #245282;
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
.button-newsession {
|
|
136
|
-
|
|
141
|
+
background: #469765;
|
|
137
142
|
}
|
|
138
143
|
|
|
139
|
-
.button-newsession:hover,
|
|
140
|
-
|
|
144
|
+
.button-newsession:hover,
|
|
145
|
+
.button-newsession:active,
|
|
146
|
+
.button-newsession:focus {
|
|
147
|
+
background: #397d53;
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
.button-restart {
|
|
144
|
-
|
|
151
|
+
background: #ca453f;
|
|
145
152
|
}
|
|
146
153
|
|
|
147
|
-
.button-restart:hover,
|
|
148
|
-
|
|
154
|
+
.button-restart:hover,
|
|
155
|
+
.button-restart:active .button-restart:focus {
|
|
156
|
+
background: #b03d37;
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
.button-restart:disabled {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
160
|
+
color: rgba(120, 131, 142, 0.3);
|
|
161
|
+
background: rgba(120, 131, 142, 0.3);
|
|
162
|
+
cursor: not-allowed;
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
.button-logs {
|
|
158
|
-
|
|
166
|
+
background: #964582;
|
|
159
167
|
}
|
|
160
168
|
|
|
161
|
-
.button-logs:hover,
|
|
162
|
-
|
|
169
|
+
.button-logs:hover,
|
|
170
|
+
.button-logs:active,
|
|
171
|
+
.button-logs:focus {
|
|
172
|
+
background: #7d396c;
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
.button-logs:disabled {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
color: rgba(120, 131, 142, 0.3);
|
|
177
|
+
background: rgba(120, 131, 142, 0.3);
|
|
178
|
+
cursor: not-allowed;
|
|
169
179
|
}
|
|
170
180
|
|
|
171
181
|
.button-logout {
|
|
172
|
-
|
|
182
|
+
background: #2c649e;
|
|
173
183
|
}
|
|
174
184
|
|
|
175
|
-
.button-logout:hover,
|
|
176
|
-
|
|
185
|
+
.button-logout:hover,
|
|
186
|
+
.button-logout:active,
|
|
187
|
+
.button-logout:focus {
|
|
188
|
+
background: #245282;
|
|
177
189
|
}
|
|
178
190
|
|
|
179
191
|
.formcontainer {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
text-align: center;
|
|
193
|
+
padding-top: 0;
|
|
194
|
+
padding-bottom: 30px;
|
|
195
|
+
margin: 0 auto 0 auto;
|
|
184
196
|
}
|
|
185
197
|
|
|
186
198
|
.sso-buttons {
|
|
187
|
-
|
|
199
|
+
padding-bottom: 15px;
|
|
188
200
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
align-items: center;
|
|
192
204
|
}
|
|
193
205
|
|
|
194
206
|
.sso-buttons .g_id_signin div {
|
|
195
|
-
|
|
207
|
+
margin: 0 auto;
|
|
196
208
|
}
|
|
197
209
|
|
|
198
210
|
a {
|
|
199
|
-
|
|
211
|
+
color: #000000;
|
|
200
212
|
}
|
|
201
213
|
|
|
202
214
|
#log-modal {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
display: none;
|
|
216
|
+
background: rgba(3, 17, 3, 0.8);
|
|
217
|
+
position: absolute;
|
|
218
|
+
top: 0;
|
|
219
|
+
bottom: 0;
|
|
220
|
+
left: 0;
|
|
221
|
+
right: 0;
|
|
222
|
+
border-radius: 3px;
|
|
223
|
+
border: 0;
|
|
224
|
+
margin: 20px;
|
|
213
225
|
}
|
|
214
226
|
|
|
215
227
|
#log-output {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
margin: 20px;
|
|
229
|
+
color: #bbbbbb;
|
|
230
|
+
overflow: auto;
|
|
231
|
+
font-family: Courier, monospace;
|
|
232
|
+
font-size: 12px;
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
line-height: 16px;
|
|
235
|
+
height: calc(100% - 150px);
|
|
224
236
|
}
|
|
225
237
|
|
|
226
238
|
.log-buttons {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
239
|
+
position: absolute;
|
|
240
|
+
bottom: 0;
|
|
241
|
+
margin: 0;
|
|
242
|
+
left: 50%;
|
|
243
|
+
-ms-transform: translate(-50%, -50%);
|
|
244
|
+
transform: translate(-50%, -50%);
|
|
245
|
+
display: flex;
|
|
234
246
|
}
|
|
235
247
|
|
|
236
248
|
.log-buttons .button {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
249
|
+
margin-left: 10px;
|
|
250
|
+
margin-right: 10px;
|
|
251
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {expect, test, vi} from 'vitest';
|
|
1
|
+
import {expect, test, vi} from "vitest";
|
|
3
2
|
import {populateUserMap} from "../src/auth/external";
|
|
4
|
-
import {
|
|
5
|
-
import winston from 'winston';
|
|
3
|
+
import {logger} from "../src/util";
|
|
6
4
|
|
|
7
5
|
const userMapString = `
|
|
8
6
|
# foo
|
|
@@ -16,32 +14,35 @@ jane janeuser # comment about Jane
|
|
|
16
14
|
badline
|
|
17
15
|
badlinewithcomment # comment
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
`;
|
|
20
18
|
|
|
21
|
-
vi.mock(
|
|
22
|
-
readFileSync: vi.fn(
|
|
19
|
+
vi.mock("fs", () => ({
|
|
20
|
+
readFileSync: vi.fn(_file_name => {
|
|
23
21
|
return userMapString;
|
|
24
22
|
})
|
|
25
|
-
}))
|
|
23
|
+
}));
|
|
26
24
|
|
|
27
25
|
const logWarn = vi.spyOn(logger, "warning").mockImplementation(vi.fn());
|
|
28
26
|
const logInfo = vi.spyOn(logger, "info").mockImplementation(vi.fn());
|
|
29
27
|
|
|
30
|
-
test(
|
|
28
|
+
test("Parse user mapping table file", () => {
|
|
31
29
|
const userMaps = new Map();
|
|
32
30
|
const expectedMaps = new Map([
|
|
33
|
-
[
|
|
34
|
-
|
|
35
|
-
[
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
[
|
|
32
|
+
"test_issuer",
|
|
33
|
+
new Map([
|
|
34
|
+
["alice", "aliceuser"],
|
|
35
|
+
["Bob", "bobuser"],
|
|
36
|
+
["carol", "caroluser"],
|
|
37
|
+
["emma", "emmauser"],
|
|
38
|
+
["Rosalind Franklin", "rfranklin"],
|
|
39
|
+
["jane", "janeuser"]
|
|
40
|
+
])
|
|
41
|
+
]
|
|
41
42
|
]);
|
|
42
43
|
|
|
43
44
|
populateUserMap(userMaps, "test_issuer", "dummy path");
|
|
44
|
-
|
|
45
|
+
|
|
45
46
|
expect(userMaps).toStrictEqual(expectedMaps);
|
|
46
47
|
expect(logWarn).toHaveBeenNthCalledWith(1, "Ignoring malformed usermap line: badline");
|
|
47
48
|
expect(logWarn).toHaveBeenNthCalledWith(2, "Ignoring malformed usermap line: badlinewithcomment");
|
package/.prettierrc.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"arrowParens": "avoid",
|
|
3
|
-
"bracketSpacing": false,
|
|
4
|
-
"embeddedLanguageFormatting": "auto",
|
|
5
|
-
"htmlWhitespaceSensitivity": "css",
|
|
6
|
-
"insertPragma": false,
|
|
7
|
-
"bracketSameLine": false,
|
|
8
|
-
"jsxSingleQuote": false,
|
|
9
|
-
"proseWrap": "preserve",
|
|
10
|
-
"quoteProps": "as-needed",
|
|
11
|
-
"requirePragma": false,
|
|
12
|
-
"semi": true,
|
|
13
|
-
"singleQuote": false,
|
|
14
|
-
"trailingComma": "none",
|
|
15
|
-
"useTabs": false,
|
|
16
|
-
"printWidth": 240,
|
|
17
|
-
"tabWidth": 4
|
|
18
|
-
}
|