Skip to content

Commit ed50473

Browse files
authored
Fix: avoid throwing MissingSamlUserInfoError when remote/x509 header is present
1 parent aa85035 commit ed50473

File tree

1 file changed

+8
-5
lines changed
  • src/fireedge/src/server/routes/entrypoints

1 file changed

+8
-5
lines changed

src/fireedge/src/server/routes/entrypoints/App.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,17 @@ router.get('*', async (req, res) => {
125125
httpOnly: true,
126126
sameSite: 'lax',
127127
})
128-
} else {
129-
if (validateAuth && !findHeader) {
128+
} else if (validateAuth) {
129+
// Remote/x509 auth is configured. If header missing, raise MissingHeaderError.
130+
if (!findHeader) {
130131
throw new MissingHeaderError(JSON.stringify(req.headers))
131-
} else {
132-
throw new MissingSamlUserInfoError(req?.cookies?.saml_user)
133132
}
133+
// If header is present, continue — remoteUser was already built above.
134+
} else {
135+
// No remote auth and no saml user info: this is the expected missing SAML info case.
136+
throw new MissingSamlUserInfoError(req?.cookies?.saml_user)
134137
}
135-
138+
136139
const paramsAxios = {
137140
method: POST,
138141
url: `${defaultProtocol}://${defaultIP}:${

0 commit comments

Comments
 (0)