Search code examples
javaspringsamlspring-saml

Dynamic entityBaseUrl in MetadataGenerator


I have a single web server which serves multiple tenants. Each tenant has it's own hostname. But it seems that MetadataGenerator can have only single entityBaseUrl at a time.

Is it possible either to use several instances of MetadataGenerator or to use dynamically defined entityBaseUrl when genetating metadata?


Solution

  • The automatic generation of metadata (MetadataGeneratorFilter + MetadataGenerator) supports only a single hostname. You should use pre-generated metadata (details can be found in the Spring SAML manual), or customize the metadata generation in case you need to support multiple hostnames.