Skip to content

Commit

Permalink
Update src/pepr/operator/crd/validators/package-validator.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Blake Burkhart <[email protected]>
  • Loading branch information
Racer159 and bburky authored Aug 2, 2024
1 parent d036ac5 commit 220b2c7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/pepr/operator/crd/validators/package-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,13 @@ export async function validator(req: PeprValidateRequest<UDSPackage>) {
// If this is a public client ensure that it only sets itself up as an OAuth Device Flow client
if (
client.publicClient &&
(client.standardFlowEnabled === undefined ||
client.standardFlowEnabled ||
client.secret ||
client.secretName ||
client.secretTemplate ||
client.enableAuthserviceSelector ||
(client.standardFlowEnabled !== false ||
client.secret !== undefined ||
client.secretName !== undefined ||
client.secretTemplate !== undefined ||
client.enableAuthserviceSelector !== undefined ||
client.protocol === "saml" ||
!client.attributes ||
client.attributes["oauth2.device.authorization.grant.enabled"] != "true")
client.attributes?.["oauth2.device.authorization.grant.enabled"] !== "true")
) {
return req.Deny(
`The client ID "${client.clientId}" must _only_ configure the OAuth Device Flow as a public client`,
Expand Down

0 comments on commit 220b2c7

Please sign in to comment.