saml-idp / saml_idp

Ruby SAML Identity Provider, best used with Rails (though not required)
MIT License
263 stars 181 forks source link

Added options to switch IdP configurations such as x509cert, secret key and password on the fly #186

Closed hamaron closed 2 weeks ago

hamaron commented 2 years ago

I've had this feature in my fork and used it in Production for years, so I wanted to give it back to the community.

Just as https://github.com/saml-idp/saml_idp/pull/88, we want to change the IdP configuration such as x509cert, secret key, and password on the fly if the IDP is multitenancy, depending on who the customer is.

You can change the configuration when returning a SAML response like so:

def create
        @saml_response = encode_response(current_user, {
          x509_certificate: "=== Valid Certificate ===",
          secret_key: "Valid Secret Key"
        })
        render template: "saml_idp/idp/saml_post", layout: false
end
Zogoo commented 10 months ago

@hamaron thanks for your contribution, The code looks good to me. can you resolve the conflict in your branch?

Zogoo commented 2 weeks ago

This pull request has been recreated as https://github.com/saml-idp/saml_idp/pull/209. We will consider that pull request as the latest version since this one is outdated.