Conversation
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
|
👋 Commands for maintainers:
|
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
| } | ||
|
|
||
| json.NewEncoder(w).Encode(ssoLookupResponse{Orgs: orgs}) | ||
| } |
There was a problem hiding this comment.
SSO lookup endpoint reveals org membership without authentication
Medium Severity
The handleSSOLookup endpoint (GET /auth/sso/lookup?email=...) is publicly accessible with no authentication or rate limiting. It returns organization IDs, names, and login URLs for any email address that maps to a SCIM-provisioned user in a SAML-enabled org. An attacker can enumerate email addresses to discover which organizations exist, their names, and which users belong to them. Consider adding rate limiting or a CAPTCHA to mitigate enumeration.
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
Signed-off-by: Emil Todorovski <emil.todorovski@brightmarbles.io>
| github.com/crewjam/saml v0.5.1 // indirect | ||
| github.com/di-wu/parser v0.2.2 // indirect | ||
| github.com/di-wu/xsd-datetime v1.0.0 // indirect | ||
| github.com/elimity-com/scim v0.0.0-20240320110924-172bf2aee9c8 // indirect |
There was a problem hiding this comment.
Directly imported dependencies marked as indirect in go.mod
Low Severity
github.com/crewjam/saml and github.com/elimity-com/scim are directly imported by new package code (pkg/authentication/okta_saml.go and pkg/directory/scim/http.go respectively) but are listed as // indirect in go.mod. Additionally, github.com/golang-jwt/jwt/v5 appears both as a direct dependency (line 17) and as an indirect dependency (line 69). Running go mod tidy would correct these classifications.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if _, err := base64.StdEncoding.DecodeString(strings.ReplaceAll(pemStr, "\n", "")); err != nil { | ||
| return "", fmt.Errorf("not a valid PEM or base64 DER certificate") | ||
| } | ||
| return strings.ReplaceAll(pemStr, "\n", ""), nil |
There was a problem hiding this comment.
Raw base64 certificate path skips X.509 validation
Medium Severity
pemToBase64DER validates the certificate as X.509 only when PEM headers are present. When input is raw base64 (no ----- prefix), it only checks that the string is valid base64, not that it represents a valid X.509 certificate. This allows arbitrary base64 data to be stored as an IdP certificate, which will then cause opaque SAML signature verification failures at login time rather than a clear error at configuration time.


Introduces Enterprise SSO login using OKTA
IMPORTANT NOTES: