Skip to content

Commit f7bc773

Browse files
authored
Merge branch 'main' into 971-parsing-bug-fix
2 parents 782b393 + 25dbd56 commit f7bc773

File tree

48 files changed

+1063
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1063
-249
lines changed

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
with:
2222
comment-summary-in-pr: always
2323
fail-on-severity: high
24-
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
24+
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib
2525
fail-on-scopes: development, runtime
2626
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'

config.schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@
103103
}
104104
}
105105
},
106+
"apiAuthentication": {
107+
"description": "List of authentication sources for API endpoints. May be empty, in which case all endpoints are public.",
108+
"type": "array",
109+
"items": {
110+
"$ref": "#/definitions/authentication"
111+
}
112+
},
106113
"tls": {
107114
"description": "TLS configuration for secure connections",
108115
"type": "object",
@@ -124,6 +131,19 @@
124131
"description": "Configuration source"
125132
}
126133
}
134+
},
135+
"uiRouteAuth": {
136+
"description": "UI routes that require authentication (logged in or admin)",
137+
"type": "object",
138+
"properties": {
139+
"enabled": { "type": "boolean" },
140+
"rules": {
141+
"type": "array",
142+
"items": {
143+
"$ref": "#/definitions/routeAuthRule"
144+
}
145+
}
146+
}
127147
}
128148
},
129149
"definitions": {
@@ -155,6 +175,14 @@
155175
"options": { "type": "object" }
156176
},
157177
"required": ["type", "enabled"]
178+
},
179+
"routeAuthRule": {
180+
"type": "object",
181+
"properties": {
182+
"pattern": { "type": "string" },
183+
"adminOnly": { "type": "boolean" },
184+
"loginRequired": { "type": "boolean" }
185+
}
158186
}
159187
},
160188
"additionalProperties": false

cypress/e2e/autoApproved.cy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import moment from 'moment';
22

33
describe('Auto-Approved Push Test', () => {
44
beforeEach(() => {
5+
cy.login('admin', 'admin');
6+
57
cy.intercept('GET', '/api/v1/push/123', {
68
statusCode: 200,
79
body: {
@@ -45,7 +47,7 @@ describe('Auto-Approved Push Test', () => {
4547
});
4648

4749
it('should display auto-approved message and verify tooltip contains the expected timestamp', () => {
48-
cy.visit('/admin/push/123');
50+
cy.visit('/dashboard/push/123');
4951

5052
cy.wait('@getPush');
5153

cypress/e2e/login.cy.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,29 @@ describe('Login page', () => {
1919
cy.get('[data-test="login"]').should('exist');
2020
});
2121

22+
it('should redirect to repo list on valid login', () => {
23+
cy.intercept('GET', '**/api/auth/me').as('getUser');
24+
25+
cy.get('[data-test="username"]').type('admin');
26+
cy.get('[data-test="password"]').type('admin');
27+
cy.get('[data-test="login"]').click();
28+
29+
cy.wait('@getUser');
30+
31+
cy.url().should('include', '/dashboard/repo');
32+
})
33+
2234
describe('OIDC login button', () => {
2335
it('should exist', () => {
2436
cy.get('[data-test="oidc-login"]').should('exist');
2537
});
2638

2739
// Validates that OIDC is configured correctly
2840
it('should redirect to /oidc', () => {
41+
// Set intercept first, since redirect on click can be quick
42+
cy.intercept('GET', '/api/auth/oidc').as('oidcRedirect');
2943
cy.get('[data-test="oidc-login"]').click();
30-
cy.url().should('include', '/oidc');
44+
cy.wait('@oidcRedirect');
3145
});
3246
});
3347
});

cypress/e2e/repo.cy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
describe('Repo', () => {
22
beforeEach(() => {
3-
cy.visit('/admin/repo');
3+
cy.login('admin', 'admin');
4+
5+
cy.visit('/dashboard/repo');
46

57
// prevent failures on 404 request and uncaught promises
68
cy.on('uncaught:exception', () => false);
@@ -18,7 +20,7 @@ describe('Repo', () => {
1820

1921
cy
2022
// find the entry for finos/test-repo
21-
.get('a[href="/admin/repo/test-repo"]')
23+
.get('a[href="/dashboard/repo/test-repo"]')
2224
// take it's parent row
2325
.closest('tr')
2426
// find the nearby span containing Code we can click to open the tooltip

cypress/support/commands.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
Cypress.Commands.add('login', (username, password) => {
3030
cy.session([username, password], () => {
3131
cy.visit('/login');
32+
cy.intercept('GET', '**/api/auth/me').as('getUser');
33+
3234
cy.get('[data-test=username]').type(username);
3335
cy.get('[data-test=password]').type(password);
3436
cy.get('[data-test=login]').click();
35-
cy.url().should('contain', '/admin/profile');
37+
38+
cy.wait('@getUser');
39+
cy.url().should('include', '/dashboard/repo');
3640
});
3741
});

0 commit comments

Comments
 (0)