Service Provider creation without entity descriptor in config file#35454
Merged
flyinghermit merged 12 commits intomasterfrom Dec 12, 2023
Merged
Service Provider creation without entity descriptor in config file#35454flyinghermit merged 12 commits intomasterfrom
flyinghermit merged 12 commits intomasterfrom
Conversation
- fetch ed from remote entity ID endpoint - if ed is not available, generate a default ed with entity ID and acs url
- fetch and generate func tests - add logger and http client to SAMLIdPServiceProviderService
bl-nero
approved these changes
Dec 8, 2023
Contributor
bl-nero
left a comment
There was a problem hiding this comment.
The code looks good, but I was unable to properly test it (my local Teleport suddenly stopped receiving features from Sales Center and I can't force it to enable SAML).
Contributor
Author
mdwn
approved these changes
Dec 11, 2023
- move http client init to NewSAMLIdPServiceProviderService - catch eof error in validateSAMLIdPServiceProvider for verbosity
r0mant
reviewed
Dec 11, 2023
r0mant
approved these changes
Dec 12, 2023
Collaborator
r0mant
left a comment
There was a problem hiding this comment.
lgtm with a couple of suggestions
| defer resp.Body.Close() | ||
|
|
||
| if resp.StatusCode != http.StatusOK { | ||
| return trace.Wrap(trace.ReadError(resp.StatusCode, nil)) |
Collaborator
There was a problem hiding this comment.
Should we read response body and include it in the error and/or log it for easier troubleshooting?
Contributor
Author
There was a problem hiding this comment.
I don't think so. Unless the error is from reading invalid xml or metadata type, I doubt response body would add any meaningful information what is not already provided with StatusCode.
|
@flyinghermit See the table below for backport results.
|
flyinghermit
added a commit
that referenced
this pull request
Dec 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
acs_url) is added to accept Assertion Consumer Service URL.see #34661, https://github.com/gravitational/teleport.e/issues/2692
Manually tested with service providers.
Works only with
tctl, Web UI will be updated with another PR.To test this PR, create a new service provider with the following spec:
It should generate entity descriptor with the following XML format:
Changelog: Added guided SAML entity descriptor creation when entity descriptor XML is not yet available.