Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAC-33430 Add request signing to SLO requests #3

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

chet-wynn-cookieai
Copy link
Collaborator

Sign SLO requests

Different request being signed: https://github.com/cookieai-jar/saml/blob/main/service_provider.go#L249

Github issue containing working solution: crewjam#550

go test ./...
?   	github.com/crewjam/saml/example	[no test files]
?   	github.com/crewjam/saml/example/idp	[no test files]
?   	github.com/crewjam/saml/example/trivial	[no test files]
?   	github.com/crewjam/saml/logger	[no test files]
?   	github.com/crewjam/saml/testsaml	[no test files]
ok  	github.com/crewjam/saml	3.052s
ok  	github.com/crewjam/saml/samlidp	(cached)
ok  	github.com/crewjam/saml/samlsp	(cached)
ok  	github.com/crewjam/saml/xmlenc	(cached)

@chet-wynn-cookieai chet-wynn-cookieai requested a review from a team March 27, 2024 05:59
@@ -1213,6 +1212,9 @@ func (sp *ServiceProvider) MakeLogoutRequest(idpURL, nameID string) (*LogoutRequ
SPNameQualifier: sp.Metadata().EntityID,
},
}
if sessionID != "" {
req.SessionIndex = &SessionIndex{Value: sessionID}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to include this so IDP can reference our "external" session ID

@@ -1251,21 +1256,42 @@ func (r *LogoutRequest) Redirect(relayState string) *url.URL {

rv, _ := url.Parse(r.Destination)

query := rv.Query()
query.Set("SAMLRequest", w.String())
query := rv.RawQuery

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you intentionally building URL query manually?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It came from the solution from github issue.

There's some base64 -> url encoding that will likely causes problems.

@chet-wynn-cookieai chet-wynn-cookieai merged commit f78864f into main Mar 27, 2024
@chet-wynn-cookieai chet-wynn-cookieai deleted the slo-redirect-fix branch March 27, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants