fix(auth): Review-Findings M1, M2, S1, S2
CI / App (npm ci + Build, ESLint, Stylelint, Jest) (pull_request) Successful in 1m42s
CI / App (npm ci + Build, ESLint, Stylelint, Jest) (pull_request) Successful in 1m42s
- M1: Start bricht ab, wenn oidc+naturalcrit aktiv, nicht lokal und Upstream-secret Standard/leer - M2: README.md wieder mit CRLF (Diff nur +4) - S1: /auth/oidc/login zeigt interne Fehlertexte nicht mehr an - S2: http://-Issuer nur bei http://-HB_PUBLIC_URL Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb9f4b0345
commit
66bb91cb3e
8 files changed
+224
-184
No files matched your search
@@ -19,7 +19,7 @@ const buildApp = (envOverrides = {}, depsOverrides = {})=>{
|
||||
const config = readAuthConfig({
|
||||
HB_PUBLIC_URL : appUrl, HB_OIDC_ISSUER : idp.issuer, HB_OIDC_CLIENT_ID : CLIENT.client_id,
|
||||
HB_OIDC_CLIENT_SECRET : CLIENT.client_secret, HB_SESSION_SECRET : SECRET, ...envOverrides
|
||||
});
|
||||
}, { upstreamSecret: 'eigenes-secret' });
|
||||
const app = express();
|
||||
app.use(cookieParser());
|
||||
// Stand-in für die Upstream-Account-Middleware: nc_session-Cookie == Benutzername
|
||||
@@ -203,7 +203,7 @@ describe('OIDC-Login (Authorization Code + PKCE) gegen Mock-IdP', ()=>{
|
||||
const b = browser();
|
||||
const start = await b.req('/auth/oidc/login');
|
||||
const { callbackUrl } = await loginAtIdp(start.headers.get('location'), { login: 'alice' });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET }, { upstreamSecret: 'eigenes-secret' });
|
||||
const tx = openTx(config, b.jar[TX_COOKIE]);
|
||||
b.jar[TX_COOKIE] = sealTx(config, { ...tx, createdAt: Date.now() - 11 * 60 * 1000 });
|
||||
await expectErrorPage(await b.req(callbackUrl), 400);
|
||||
@@ -222,7 +222,7 @@ describe('OIDC-Login (Authorization Code + PKCE) gegen Mock-IdP', ()=>{
|
||||
const b = browser();
|
||||
const start = await b.req('/auth/oidc/login');
|
||||
const { callbackUrl } = await loginAtIdp(start.headers.get('location'), { login: 'alice' });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET }, { upstreamSecret: 'eigenes-secret' });
|
||||
const tx = openTx(config, b.jar[TX_COOKIE]);
|
||||
b.jar[TX_COOKIE] = sealTx(config, { ...tx, nonce: 'anderer-nonce' });
|
||||
await expectErrorPage(await b.req(callbackUrl), 400);
|
||||
@@ -234,7 +234,7 @@ describe('OIDC-Login (Authorization Code + PKCE) gegen Mock-IdP', ()=>{
|
||||
const b = browser();
|
||||
const start = await b.req('/auth/oidc/login');
|
||||
const { callbackUrl } = await loginAtIdp(start.headers.get('location'), { login: 'alice' });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET });
|
||||
const config = readAuthConfig({ HB_PUBLIC_URL: appUrl, HB_OIDC_ISSUER: idp.issuer, HB_OIDC_CLIENT_ID: 'x', HB_OIDC_CLIENT_SECRET: 'x', HB_SESSION_SECRET: SECRET }, { upstreamSecret: 'eigenes-secret' });
|
||||
const tx = openTx(config, b.jar[TX_COOKIE]);
|
||||
b.jar[TX_COOKIE] = sealTx(config, { ...tx, codeVerifier: 'A'.repeat(43) });
|
||||
await expectErrorPage(await b.req(callbackUrl), 400);
|
||||
|
||||
Reference in new issue
Block a user