-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Generate SAML metadata for the Identity Provider #52415
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
Generate SAML metadata for the Identity Provider #52415
Conversation
- Expose an API that consumes (possibly signed) AuthnRequests as defined by the HTTP-Redirect binding. - Process AuthnRequests, validate and parse them into a minimum set of information to be used for subsequent API calls to get a SAML Response
This change adds an API for generating SAML metadata for the configured Identity Provider. All parameters that can contribute to the metadata, from signing keys to Organization and contact details are all configured in node settings. The caller of the API needs to define the SP that will consume this metadata as the values included can potentially be different, depending on the registered SP configuration and the IDP policy.
|
Pinging @elastic/es-security (:Security/Security) |
...ntity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGenerator.java
Show resolved
Hide resolved
...n/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/test/IdpSamlTestCase.java
Show resolved
Hide resolved
...ty-provider/src/main/java/org/elasticsearch/xpack/idp/action/SamlGenerateMetadataAction.java
Outdated
Show resolved
Hide resolved
...y-provider/src/main/java/org/elasticsearch/xpack/idp/action/SamlGenerateMetadataRequest.java
Show resolved
Hide resolved
...-provider/src/main/java/org/elasticsearch/xpack/idp/action/SamlGenerateMetadataResponse.java
Outdated
Show resolved
Hide resolved
...provider/src/main/java/org/elasticsearch/xpack/idp/rest/RestSamlGenerateMetadataRequest.java
Outdated
Show resolved
Hide resolved
...tity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/idp/SamlIdPMetadataBuilder.java
Outdated
Show resolved
Hide resolved
...tity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/idp/SamlIdPMetadataBuilder.java
Outdated
Show resolved
Hide resolved
...ntity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGenerator.java
Show resolved
Hide resolved
...n/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/test/IdpSamlTestCase.java
Show resolved
Hide resolved
|
|
||
| import static org.elasticsearch.rest.RestRequest.Method.GET; | ||
|
|
||
| public class RestSamlMetadataRequestAction extends BaseRestHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call this either
| public class RestSamlMetadataRequestAction extends BaseRestHandler { | |
| public class RestGetSamlMetadataAction extends BaseRestHandler { |
or
| public class RestSamlMetadataRequestAction extends BaseRestHandler { | |
| public class RestSamlMetadataAction extends BaseRestHandler { |
|
|
||
| @Override | ||
| public String getName() { | ||
| return "saml_idp_generate_metadata"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably change this name, based on what you decide to call the class.
|
GitHub/Jenkins seems to have lost the CI results. @elasticmachine test this please |
| @Override | ||
| public String getName() { | ||
| return "saml_idp_generate_metadata"; | ||
| return "saml_metadata"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit, our names typically end in _action.
TBH I don't know why - it's already obvious it's an action.
|
@elasticmachine update branch |
This change adds an API for generating SAML metadata for the
configured Identity Provider. All parameters that can contribute
to the metadata, from signing keys to Organization and contact
details are all configured in node settings.
The caller of the API needs to define the SP that will consume this
metadata as the values included can potentially be different,
depending on the registered SP configuration and the IDP policy.
This doesn't actually really depend, but builds upon #52018 to reduce duplication of effort, so it should be reviewed once that is merged.