opensaml

Create SAML Assertion and Sign the response

此生再无相见时 提交于 2020-08-21 19:25:11
问题 I have a Java web application. I want to implement SAML Single-Sign-On login for my application. I have got this GitHub onelogin program to send request and get response. But it was not working properly. I created one account there. But I don't have an enterprise account. When I run the application, it is going to onelogin login page. I tried to login, but it is not returning anyuthing in the response, showing I don't have permission. If I provide wrong credentials also, it is not giving any

How to create a valid SAML 2.0 Assertion with OpenSAML library in Java

爷,独闯天下 提交于 2020-06-22 13:15:45
问题 I am new to the OAuth2 concepts, SAML assertion and OpenSAML library in Java. I need my Java code to create a saml 2.0 assertions (may be XML string) using OpenSAML library. How we can create it? Please share the code and XML SAML 2.0 assertion. 回答1: I had created the SAML 2.0 assertions in my code using OpenSAML library (http://mvnrepository.com/artifact/org.opensaml/opensaml). The XML O/P is also shown below. import java.util.HashMap; import java.util.Iterator; import java.util.Map; import

How to create a valid SAML 2.0 Assertion with OpenSAML library in Java

最后都变了- 提交于 2020-06-22 13:14:43
问题 I am new to the OAuth2 concepts, SAML assertion and OpenSAML library in Java. I need my Java code to create a saml 2.0 assertions (may be XML string) using OpenSAML library. How we can create it? Please share the code and XML SAML 2.0 assertion. 回答1: I had created the SAML 2.0 assertions in my code using OpenSAML library (http://mvnrepository.com/artifact/org.opensaml/opensaml). The XML O/P is also shown below. import java.util.HashMap; import java.util.Iterator; import java.util.Map; import

Do we need Keystore/JKSKeyManager in IDP initiated SSO (SAML)?

坚强是说给别人听的谎言 提交于 2020-01-14 22:34:21
问题 I've successfully implemented SSO authentication using Spring-SAML extension. Primary requirement for us to support IDP-initiated SSO to our application. Well, by using the configurations from spring-security-saml2-sample even SP-initiated SSO flow also works for us. Question: Is keystore is used in IDP-initiated SSO (if metadata has certificate)? If not used, I would like to get rid of keystore configurations from securityContext.xml . Note: SP-initiated SSO and Global logout is not needed

How to configuration of IDP metadata and SP metadata in Spring Security SAML sample?

元气小坏坏 提交于 2020-01-12 04:01:13
问题 I want to deal with Spring Security SAML. For this, I start to explore Spring Security SAML. At the beginning, I create an account at SSOCircle. Than I configurated of IDP metadata and generation of SP metadata (4.2.2 and 4.2.3). At entityId I set: <bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter"> <constructor-arg> <bean class="org.springframework.security.saml.metadata.MetadataGenerator"> <property name="entityId" value="http://idp

Opensaml xmlns is not generated on nameIDPolicy and AuthnContext

喜欢而已 提交于 2020-01-05 07:09:11
问题 Hi i want my xml look like this: <samlp:NameIDPolicy xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true"> </samlp:NameIDPolicy> my setup with opensaml is: // NameIDPolicy nameIdPolicyBuilder = new NameIDPolicyBuilder(); nameIdPolicy = nameIdPolicyBuilder.buildObject("urn:oasis:names:tc:SAML:2.0:protocol", "NameIDPolicy", "samlp"); nameIdPolicy.setFormat("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress");

SpringSecurity-SAML(OpenSAML): Failed to unmarshall assertion: getting org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR

馋奶兔 提交于 2020-01-03 00:50:27
问题 Using spring-security-saml for handling assertions from IDP, getting below error after server is up for 1 to 2 hours. Issue is not reproducible all the time. By looking at stacktrace, issue seems to be related to parser pool used in spring saml configuration. Please share any thoughts. library versions: opensaml 2.6.1 spring-security-saml2 1.0.0.RELEASE parser pool config: <bean id="parserPool" class="org.opensaml.xml.parse.StaticBasicParserPool" init-method="initialize"> <property name=

SSO - SAML, Redirect a user to a specified landing page after successful log in

余生颓废 提交于 2020-01-01 03:29:07
问题 I am implementing SSO where I am the Identity Provider, right now I am able to successfully log into the Service Provider. But it takes me to the home page. I want to specify the landing page URL when I post the response. Have searched quite a lot but could not find anything convincing. Do not quite know which element of the SAML response carries the Landing page URL or is the in the form that I have to specify. Using java and opensaml libraries to generate the response. 回答1: Though it is not

how to migrate from opensaml 2.6 to 3.1.1

时间秒杀一切 提交于 2019-12-31 12:57:48
问题 I have to migrate a class from opensaml 2.6 to opensaml 3.1.1 Compiling I obtain some errors 1) Element plaintextElement = getElementAssertion(inputBean); String xml = XMLHelper.prettyPrintXML(plaintextElement); I can't find the class XMLHelper in the new version. 2) DefaultBootstrap.bootstrap(); builderFactory = Configuration.getBuilderFactory(); Configuration.getMarshallerFactory().getMarshaller(assertion).marshall(assertion); I can'f find class DefaultBootstrap and I can't find a class

How to decrypt EncryptedAssertion manually

三世轮回 提交于 2019-12-31 07:17:12
问题 I want to decrypt the EncryptedAssertion. I tried with OpenSaml Decrypter but its not working for me.I am getting Failed to decrypt EncryptedData I have already ask that question - EncryptedAssertion Decryption failing While I am waiting for any solution I am trying to decrypt it manually. Its a Hybrid encryption I tried below code CipherValue cv = encryptedAssertion.getEncryptedData().getKeyInfo().getEncryptedKeys().get(0).getCipherData().getCipherValue(); String cvalue = cv.getValue();