saml | SAML parlance an Identity Provider | Authentication library

 by   crewjam Go Version: v0.4.13 License: BSD-2-Clause

kandi X-RAY | saml Summary

kandi X-RAY | saml Summary

saml is a Go library typically used in Security, Authentication applications. saml has no bugs, it has a Permissive License and it has medium support. However saml has 4 vulnerabilities. You can download it from GitHub.

In SAML parlance an Identity Provider (IDP) is a service that knows how to authenticate users. A Service Provider (SP) is a service that delegates authentication to an IDP. If you are building a service where users log in with someone else's credentials, then you are a Service Provider. This package supports implementing both service providers and identity providers. The core package contains the implementation of SAML. The package samlsp provides helper middleware suitable for use in Service Provider applications. The package samlidp provides a rudimentary IDP service that is useful for testing or as a starting point for other integrations.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              saml has a medium active ecosystem.
              It has 814 star(s) with 382 fork(s). There are 26 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 38 open issues and 179 have been closed. On average issues are closed in 204 days. There are 14 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of saml is v0.4.13

            kandi-Quality Quality

              saml has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              saml has 4 vulnerability issues reported (3 critical, 1 high, 0 medium, 0 low).
              saml code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              saml is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              saml releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 12116 lines of code, 373 functions and 118 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of saml
            Get all kandi verified functions for this library.

            saml Key Features

            No Key Features are available at this moment for saml.

            saml Examples and Code Snippets

            Add SAML filter chain .
            javadot img1Lines of Code : 15dot img1License : Permissive (MIT License)
            copy iconCopy
            @Bean
                public FilterChainProxy samlFilter() throws Exception {
                    List chains = new ArrayList<>();
                    chains.add(new DefaultSecurityFilterChain(new AntPathRequestMatcher("/saml/SSO/**"),
                        samlWebSSOProcessingFilter()));
              
            Handles the SAML auth
            javadot img2Lines of Code : 9dot img2License : Permissive (MIT License)
            copy iconCopy
            @GetMapping(value = "/auth")
                public String handleSamlAuth() {
                    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
                    if (auth != null) {
                        return "redirect:/home";
                    } else {
                        retu  
            Add saml webso .
            javadot img3Lines of Code : 8dot img3License : Permissive (MIT License)
            copy iconCopy
            @Bean
                public SAMLProcessingFilter samlWebSSOProcessingFilter() throws Exception {
                    SAMLProcessingFilter samlWebSSOProcessingFilter = new SAMLProcessingFilter();
                    samlWebSSOProcessingFilter.setAuthenticationManager(authenticationMana  

            Community Discussions

            QUESTION

            Spring Security SAML and UserDetailsService
            Asked 2022-Apr-01 at 10:02

            I am integrating SAML into a Spring Boot application using the implementation built into Spring Security 5.6. Much of the online help references the now deprecated external library implementation (https://github.com/spring-projects/spring-security-saml) so I am following this document:

            https://docs.spring.io/spring-security/reference/servlet/saml2/login/index.html

            I have this interaction working and I am authenticating from SAML now. Here is the configuration:

            ...

            ANSWER

            Answered 2022-Apr-01 at 10:02

            Check if Spring Boot is importing version 3 and version 4 of Open SAML. If it is use only version 4.

            Spring Security Samples has an example for SAML2. The build.gradle in the project contains the following:

            Source https://stackoverflow.com/questions/71622213

            QUESTION

            What is the latest version of opensaml?
            Asked 2022-Apr-01 at 08:04

            Regarding the heading, can someone tell me what is the latest version of opensaml-saml-api?

            I can see that on maven repository(https://repo1.maven.org/maven2/org/opensaml/opensaml-saml-api/) it's latest version is listed as 4.0.1

            Is there any other official site where I can get hold of latest opensaml version information?

            ...

            ANSWER

            Answered 2022-Apr-01 at 08:04

            The implementation you're referring to is the one developed by Shibboleth and yes their latest version is the 4.0.1. On their website they strongly encourage switching to their latest version or other alternatives as every V2 security update ceased in 2016 for Java and 2018 for C++.

            As of July 31, 2016, all security maintenance for the OpenSAML V2 Java release branch ceased. A complete schedule of the dates can be found here. All deployments should upgrade to V3 or evaluate other alternatives.

            As of July 17th, 2018, all security maintenance for the OpenSAML V2 C++ release branch ceased. The author encourages anybody using that code to seek other options or, preferably, stop implementing SAML yourself and use an existing implementation. There are no plans to ever provide meaningful documentation or support for any use of that code outside the Shibboleth Project. Use it at your own risk.

            However, there are many other implementations that you can find linked on their website

            On maven, you can check every version of Shibboleth's implementation from V3 to their latest one (the 4.0.1).

            Source https://stackoverflow.com/questions/71703298

            QUESTION

            Integrate a .net core solution with PingID
            Asked 2022-Mar-30 at 19:38

            I have a application build with .NET Core. This application is very simple, but the problem is that I have to integrate a 2FA app (PingId) for double security instead of one simple Login. I am guided to use SAML, for building bridges between Service Provider and Identity Provider. I have found some solutions online, and one of them that is open source is itfoxtec.identity.saml2.

            What I want to know is that, is there anyone who can clear the way how this works? I mean I cannot understand some url in appsetting.json file.

            Here is a demo of this file:

            https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/blob/master/test/TestWebAppCore/appsettings.json

            For example IdPMetadata key is a xml file that has to be provided by Identity Provider administrator?

            SigningCertificateFile is a generated certificate by my Service Provider app or is something builded inside the application, if that is how to generate it?

            ...

            ANSWER

            Answered 2022-Mar-30 at 19:38

            Yes, the identity provider (IdP) should expose a SAML 2.0 metadata endpoint, the URL is added in the IdPMetadata.

            The TestIdPCore sample is for testing the samples and to show how to implement a SAML 2.0 based IdP.

            Your application (relaying party RP) needs a certificate, which is e.g., added as a file in SigningCertificateFile.

            Source https://stackoverflow.com/questions/71677061

            QUESTION

            ColdFusion 2021 - How to handle SAML/SSO with multiple applications on same server
            Asked 2022-Mar-14 at 15:22

            We have a server with about a dozen small applications each in their own subfolder of the server (//URL/app1, //URL/app2, etc).

            I've got the basic SSO authentication round trip working. I set up my account with my IDP and have the response set to go to a common landing page (ACS URL). Since the landing page is currently shared with all the apps, it is in a separate folder distinct from the apps (//URL/sso/acsLandingPage.cfm)

            I'm now working on my first app. I can detect the user is not logged in so I do a initSAMLAuthRequest(idp, sp, relayState: "CALLING_PAGE_URL") and that goes out, authenticates, then returns to the landing page.

            But how do I redirect back to my target application and tell it the user is authenticated?

            If I just do a the original app doesn't know about the SAML request.

            Is there a function that I can call in the original app that will tell if the current browser/user has an open session?

            Do I need to set up separate SP for each application so rather than one common landing page each app would have its own landing page so it can set session variables to pass back to the main application? (the IDP treats our apps as "one server", I can get separate keys if that is the best way to deal with this).

            My current working idea for the ACS landing page is to parse the relayState URL to find out which application started the init request and then do something like this:

            ACSLandingPage.cfm

            ...

            ANSWER

            Answered 2022-Mar-14 at 15:22

            Ok, here's how I ended up solving this problem. Probably not the "correct" solution, but it works for me.

            The full code solution would be way too long and complicated and rely on too many local calls that would not make sense, so I'm trying to get this down to just some code snippets that will make sense to show how my solution works.

            In each application, the Application.cfc looks a bit like this. Each app has a name set to the path of the Application.cfc. We do this because we often will run "training instances" of the codebase on the same server that point to an alternate DB schema so users can play around without corrupting production data.

            Source https://stackoverflow.com/questions/71085348

            QUESTION

            SimpleSAMLphp overwrites PHP (Zend) session, doesn't happen with older SimpleSAMLphp version
            Asked 2022-Mar-14 at 11:50

            I had to update simplesamlphp on an old PHP server, the old version of the library was from 2010. Simplesamlphp is used as a Service Provider (SP) in a SP initiated enviroment.

            I replaced it with the 09/'20 release and configured it the same. It's all working except one thing.

            Simplesamlphp uses the PHPSESSION to store the session, by feature it replaces the php session with his and should set the old one again once the cleanup() method is called (on the session instance), after the authentication's complete.

            This is not working, but I was fine with it because it didn't matter for the user.

            Now I have to implement a button to test the SAML integration on a protected page. By protected I mean it requires to be authenticated (through Zend Auth) to view the page, otherwise it automatically redirects (server side) the user to the homepage.

            This is the code of the Action of this button (to test the SAML integration), that is inside this protected controller:

            ...

            ANSWER

            Answered 2022-Mar-14 at 11:50

            I managed to fix this issue very easily after many many hours, I'll write down what I did in case it may help someone else.

            My problems were:

            • simplesamlphp using the same name for the session cookie as my application (I previously already tried changing this setting, but because of the second reason below it never worked)
            • not properly cleaning simplesamlphp session in my code

            So, first all of, I added a call to the cleanup method because it was missing on the real page, the code posted on my question is the test page, this is the real page where it was missing a call to cleanup.

            Source https://stackoverflow.com/questions/71394271

            QUESTION

            Using AssertionConsumerServiceIndex instead of assertionConsumerServiceUrl with itfoxtec
            Asked 2022-Feb-25 at 09:42

            Is it possible to set a AssertionConsumerServiceIndex in a AuthnRequest like this SAML example below with ITfoxtec SAML 2.0

            I want to have somethings like this:

            ...

            ANSWER

            Answered 2022-Feb-25 at 09:42

            I'm afraid the ITfoxtec Identity SAML 2.0 component does not support the AssertionConsumerServiceIndex attribute.

            Source https://stackoverflow.com/questions/71253504

            QUESTION

            Spring Boot SAML using AWS SSO as IdP errors with Bad Input
            Asked 2022-Feb-17 at 08:52

            I want to build a site hosted with Spring Boot and I would like to use AWS SSO as the SAML identity provider for authentication. I have built a PoC application and tried to follow AWS configuration instructions and the Spring SAML examples I could find, but when I browse to my site (on localhost), AWS SSO successfully opens but then fails with "Bad Input".

            In my PoC application (which only has code for the authentication and an index page) I have:

            • added the spring-security-saml2-service-provider dependency (Spring Boot v2.6.2)
            • set up a Custom Application in AWS SSO
            • generated a private key and a self-signed certificate
            • configured my application properties as follows:
            ...

            ANSWER

            Answered 2022-Jan-31 at 15:09

            The issue is that the ACS url is set to localhost. The ACS (Assertion Consumer Service) URL is where the IdP sends the SAML Assertion.

            You're telling AWS SSO to send the SAML assertion to itself, which isn't going to work. Your application needs a public-routable IP. AWS SSO needs to send the SAML assertion over the internet.

            There may be other issues (I didn't really check anything once I ran into the ACS issue). But the ACS URL is your current issue.

            Source https://stackoverflow.com/questions/70654568

            QUESTION

            Parameterize DDL SQL Snowflake
            Asked 2022-Feb-05 at 14:54

            In the below code is there any way I can parameterize the sst part.

            I tried with concat and other methods like set ssourl=url, sst = $ssourl but of no luck. And many other methods like using concat, Identifier.

            I can't parameterize cert since it has limit of 256 bytes. Is there any way I can parameterize sst in the below code. Thanks

            ...

            ANSWER

            Answered 2022-Feb-05 at 14:54

            It could be done with Snowflake Scripting block:

            Source https://stackoverflow.com/questions/70996517

            QUESTION

            What to do with AWS Cognito's public key in ADFS
            Asked 2022-Jan-28 at 09:37

            I'm trying to configure AWS Cognito to work with ADFS as a SAML provider in a dotnet core 3.1 MVC application. I believe I have ADFS and Cognito correctly configured as I can log into the application using a user in ADFS. I am at a stage where I can login and logout, however when logging out ADFS throws the error:

            MSIS7054: The SAML logout did not complete properly.

            This does still log the user out of ADFS. I think I’ve narrowed it down to the SAML logout messages ADFS receives need to be signed. References: here, here and here

            Amazon describe how to do this from there end

            To set up the SAML IdP to add a signing certificate: To get the certificate containing the public key which will be used by the identity provider to verify the signed logout request, choose Show signing certificate under Active SAML Providers on the SAML dialog under Identity providers on the Federation console page.

            However, I’m not sure how I take their public key (which is just a string) and provided that to ADFS. The only thing I can seem to find is an encryption tab, that takes a certificate file (Is there some conversion thing I need to do?). I have tried this, which is putting the key inside a .cert file and adding to the relaying party encryption tab of ADFS, however this did not work.

            Any help would be appreciated.

            Thanks, Adam

            ...

            ANSWER

            Answered 2022-Jan-28 at 09:37

            I eventually solved the issue by taking the key from AWS Cognito and putting it in a .crt file like this said, but instead adding it to the signature tab rather than the encryption tab in the relaying trust party's properties in ADFS.

            Source https://stackoverflow.com/questions/70783990

            QUESTION

            Upgrading SustainSys.Saml2 from v1 to v2 - Set Audience Restriction
            Asked 2022-Jan-28 at 07:50

            Our identity server uses identity server 3 and implements sustainsys.saml2 for SAML integration. We have made an effort to move from v1 to v2 of the SustainSys.Saml2 NuGets. With v1, we explicitly set our audience restrictions by doing:

            ...

            ANSWER

            Answered 2022-Jan-28 at 07:50

            v2 doesn't use System.IdentityModel, but instead the more modern Microsoft.IdentityModel nuget packages. The corresponding settings are now found in SpOptions.TokenValidationParametersTemplate.

            Some parameters,like the audience restriction is set after the template is copied, but you can alter the values in the Unsafe.TokenValidationParametersCreated notification. The reason it is under "Unsafe" is because setting the wrong values in the TokenValidationParameters could remove important security checks.

            Source https://stackoverflow.com/questions/70866775

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install saml

            Let us assume we have a simple web application to protect. We'll modify this application so it uses SAML to authenticate users.
            You browse to localhost:8000/hello
            The middleware redirects you to https://samltest.id/idp/profile/SAML2/Redirect/SSO
            samltest.id prompts you for a username and password.
            samltest.id returns you an HTML document which contains an HTML form setup to POST to localhost:8000/saml/acs. The form is automatically submitted if you have javascript enabled.
            The local service validates the response, issues a session cookie, and redirects you to the original URL, localhost:8000/hello.
            This time when localhost:8000/hello is requested there is a valid session and so the main content is served.
            Please see example/idp/ for a substantially complete example of how to use the library and helpers to be an identity provider.

            Support

            The SAML standard is huge and complex with many dark corners and strange, unused features. This package implements the most commonly used subset of these features required to provide a single sign on experience. The package supports at least the subset of SAML known as interoperable SAML. This package supports the Web SSO profile. Message flows from the service provider to the IDP are supported using the HTTP Redirect binding and the HTTP POST binding. Message flows from the IDP to the service provider are supported via the HTTP POST binding. The package can produce signed SAML assertions, and can validate both signed and encrypted SAML assertions. It does not support signed or encrypted requests.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/crewjam/saml.git

          • CLI

            gh repo clone crewjam/saml

          • sshUrl

            git@github.com:crewjam/saml.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Authentication Libraries

            supabase

            by supabase

            iosched

            by google

            monica

            by monicahq

            authelia

            by authelia

            hydra

            by ory

            Try Top Libraries by crewjam

            etcd-aws

            by crewjamGo

            go-cloudformation

            by crewjamGo

            go-xmlsec

            by crewjamGo

            rfc5424

            by crewjamGo

            awsconsoleauth

            by crewjamGo