mod_auth_openidc | OpenID Certified™ OpenID Connect Relying Party | Authentication library

 by   zmartzone C Version: v2.4.12.3 License: Apache-2.0

kandi X-RAY | mod_auth_openidc Summary

kandi X-RAY | mod_auth_openidc Summary

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

This module enables an Apache 2.x web server to operate as an [OpenID Connect] Relying Party (RP) towards an OpenID Connect Provider (OP). It relays end user authentication to a Provider and receives user identity information from that Provider. It then passes on that identity information (a.k.a. claims) to applications protected by the Apache web server and establishes an authentication session for the identified user. The protected content, applications and services can be hosted by the Apache server itself or served from origin server(s) residing behind it by configuring Apache as a Reverse Proxy in front of those servers. The latter allows for adding OpenID Connect based authentication to existing applications/services/SPAs without modifying those applications, possibly migrating them away from legacy authentication mechanisms to standards-based OpenID Connect Single Sign On (SSO). By default the module sets the REMOTE_USER variable to the id_token [sub] claim, concatenated with the OP’s Issuer identifier ([sub]@[iss]). Other id_token claims are passed in HTTP headers and/or environment variables together with those (optionally) obtained from the UserInfo endpoint. The provided HTTP headers and environment variables can be consumed by applications protected by the Apache server. Custom fine-grained authorization rules - based on Apache’s Require primitives - can be specified to match against the set of claims provided in the id_token/ userinfo claims, see [here] Clustering for resilience and performance can be configured using one of the supported cache backends options as listed [here] For an exhaustive description of all configuration options, see the file [auth_openidc.conf] This file can also serve as an include file for httpd.conf.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mod_auth_openidc has a medium active ecosystem.
              It has 855 star(s) with 314 fork(s). There are 64 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 495 have been closed. On average issues are closed in 115 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of mod_auth_openidc is v2.4.12.3

            kandi-Quality Quality

              mod_auth_openidc has 0 bugs and 0 code smells.

            kandi-Security Security

              mod_auth_openidc has 2 vulnerability issues reported (0 critical, 0 high, 2 medium, 0 low).
              mod_auth_openidc code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mod_auth_openidc is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              mod_auth_openidc releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            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 mod_auth_openidc
            Get all kandi verified functions for this library.

            mod_auth_openidc Key Features

            No Key Features are available at this moment for mod_auth_openidc.

            mod_auth_openidc Examples and Code Snippets

            No Code Snippets are available at this moment for mod_auth_openidc.

            Community Discussions

            QUESTION

            Storing GET request parameters when initialising Open IDC auth dance for use after
            Asked 2021-Oct-05 at 19:34

            We are implementing Keycloak as an IDP, and will use it to secure some apps (Relying Parties)

            The apps are likely to use something like mod_auth_openidc, which will use the Authorization Code flow to direct the user to keycloak where the user will log in, do the openidc dance, and ultimately end up back at the "redirect_uri".

            We will be calling the applications with a set of parameters, lets say for example: https://some-application/launch?person=12345

            The redirect_uri is going to be https://some-application/launch, as I understand the Oauth2 spec is quite specific that the redirect_uri should be static, and not contain parameters/be dynamic.

            So this means following login the request parameter "person=12345" is lost, as the user is simply redirected back to "https://some-application/launch"

            What is the recommended pattern/approach to persist this "person=12345" request parameter before the OIDC dance takes place?

            I have read about the "state" parameter, but I am unclear how we would inject anything into this with mod_auth_openidc, or how we would read any values from it? Is it more of an application framework question - would some kind of controller/server side code (PHP/c# etc) somehow store these values in session (but I am unclear if they would have a chance to before mod_auth_openidc kicked in?

            ...

            ANSWER

            Answered 2021-Oct-05 at 19:34

            It is an application responsibility to store the location before redirecting and to restore it afterwards:

            • Single Page Apps can manage this via session storage as in this code of mine since they are in control of behaviour before and after

            • Server Side Web Apps may give you similar options, to store the location in an HTTP only cookie, then restore it after, but you need to check for the particular tech being used. It is a well known usability issue that abrupt redirects may occur that the UI cannot control, and that deep linking (as you described) may not work.

            You need an application design to solve this problem. Out of interest my recent blog post mentions this issue.

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

            QUESTION

            How to install mod_auth_openidc on RHEL 7
            Asked 2021-Aug-11 at 15:57

            I've been to the Releases site for mod_auth_openidc and brought down the rpm. And attempting to install requires cjose but attempting to find and install that poses a problem as it seems to incorrectly test the version of jansson (e.g., 2.10 is though to be less than 2.3). Most of the documentation I find is years old. Trying to use yum brings in a very outdated version of the mod_auth_openidc (1.8.8) that fails to allow apache httpd to load if you have an OIDCDirectURL coded.

            I'm trying to configure Apache HTTPD to call out to an OAUTH2 Server I've created but I can't get the old mod to work and I'd love to know where I can get the piece parts to allow the latest version to install. There are some old downloads on the Releases site if you page back to 2.0 but the libcjose0 is not an rpm.

            Do I need to retrieve the dependencies from their github and build them? If someone has done this already and posted the assets I'm happy to retrieve them. I'm surprised RHEL 7 repos don't have the latest (or newer) versions of the mod_auth_openidc.

            ...

            ANSWER

            Answered 2021-Aug-11 at 15:57

            The version issue reported when trying to install cjose is a red herring. Based on this site I found I needed to install jansson-devel to get past the errant warning about versions.

            Going here allowed me to retrieve a fairly recent version of cjose-0.5.1-1.el7.centos.x86_64.rpm which installed without complaints once jansson-devel was installed.

            I was then able to install mod_auth_openidc-2.4.9-1.el7.x86_64.rpm from the github repo releases

            I am now able to start apache httpd with the OIDCRedirectURI entry in httpd.conf

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

            QUESTION

            Connect to Azure AD from Apache web server on windows
            Asked 2021-Jul-06 at 18:46

            I am trying to use Azure AD to authenticate a website in Apache web server deployed on a windows server. A possible solution we were looking for is mod_auth_openidc, however, it is not available for windows.

            Are there any other options that can be used to authenticate a website in apache on a windows server?

            ...

            ANSWER

            Answered 2021-Jul-06 at 18:46

            The design pattern should work in any technology since HTTP interfaces are used:

            • Reverse proxy is the public URL
            • Website uses an Internal URL
            • Reverse proxy deals with OAuth and talks to Azure AD

            Note that it is generally recommended in terms of secure hosting to put a reverse proxy in front of any of these components, so that an attacker has to breach 2 layers to get to data:

            • APIs
            • Web back ends that access data sources
            • Authorization Servers

            Here is an option that might work for you - and once you have a good reverse proxy setup it gives you some interesting architectural options:

            If it helps, at Curity we have some related resources - here is one that shows how to run NGINX on a Windows PC using Docker and how to take control over behaviour via plugins.

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

            QUESTION

            What is the proper way to invoke Keycloak's end_session_enddpoint
            Asked 2021-Jun-19 at 01:03

            Environment: Keycloak 12.0.4

            We plan to allow various OpenIDC-protected applications to initiate a "single sign-out" using Keycloak's end_session_endpoint. In our case, we'd like to provide our own URL that applications will hit when they want to sign-out. That URL will either programmatically invoke the end_session_endpoint or simply redirect the user's browser to that endpoint.

            The Keycloak documentation and examples I've seen so far are a bit confusing regarding how to invoke this endpoint. For example, do I need to add a query parameter with the id token as a value? (I noticed, for example, that mod_auth_openidc includes an id_token_hint query param.) I assume this call has to be authenticated, so do I include the client id/secret as the credentials?

            Thanks!

            ...

            ANSWER

            Answered 2021-Jun-17 at 16:41

            You have standard how to call RP-Initiated Logout: https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout

            An RP requests that the OP log out the End-User by redirecting the End-User's User Agent to the OP's Logout Endpoint.

            It is a redirect, not API call, because you very likely wants to delete also IDP session (cookies on used Keycloak domain in your case).

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

            QUESTION

            How to logout with mod_auth_openidc
            Asked 2021-Jan-07 at 22:38

            I use mod_auth_openidc to implement login on my website. I use multiple providers, so to initiate a login into one I redirect to:
            /protected/redirect_uri/?target_link_uri=&iss=
            which works as expected.
            Now I want to initiate a logout in a similar manner, by refering the logout button to:
            /protected/redirect_uri?logout=&iss=
            but I simply get a 404. Of course /protected/redirect_uri does not actually exist but for some reson openidc does not handle the logout request.
            The logout page is not protected and the provider has an end_session_endpoint in it's metadata.

            ...

            ANSWER

            Answered 2021-Jan-07 at 22:38

            the slash at the end of the redirect URI matters, if it is not there the request will not be considered as matching

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

            QUESTION

            mod_auth_openidc: Refresh token fails
            Asked 2020-Oct-23 at 04:27

            I am using mod_auth_openidc with Apache and varnish catch reverse proxy in front of Grafana to offload SSO OAuth2; once I login, after sometime I get the below fetch error, as I investigated the issue; found that the OAuth token gets expired and mod_auth_openidc is not able to refresh the token; I was able to trace the flow

            ...

            ANSWER

            Answered 2020-Oct-23 at 04:27

            Thank you, I was able to resolve the issue with a workaround.

            The issue was due to XHRs Request was getting Blocked(cors), as the OAuth server is in different domain

            Changing the OIDCSessionInactivityTimeout to 24hrs worked and resolved the issue

            Below link provides the full inside and configuration

            https://github.com/zmartzone/mod_auth_openidc/issues/220

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

            QUESTION

            Issues with OIDC while performing DNS Flip
            Asked 2020-Aug-29 at 18:50

            We recently performed a DNS Flip on a Rails application integration environment. We've set example-1.com as a CNAME pointing at A record example-2.com. The service at example-2.com is a Ruby on Rails application with Apache and Passenger Phusion. On top of Apache we are using OpenId-Connect (specifically the mod_auth_openidc module).

            When we try to access example-1.com directly, everything works fine. But when we try to do so through example-2.com, we get the following error:

            ...

            ANSWER

            Answered 2020-Aug-29 at 18:50

            you can use a relative value for the OIDCRedirectURI, so:

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

            QUESTION

            Retrieve auth token from mod_auth_openidc in AngularJS client
            Asked 2020-May-21 at 06:38

            I am building an AngularJS application that is supposed to retrieve data from an API. The API is doing an introspection against the OIDC provider of my choice to verify the token sent alongside with the API call.

            The client side is not supposed to be callable before signing in on the OIDC login page. To do so, it is protected by an apache http server using mod_auth_openidc. This mod makes sure, that the client is being redirected to the OIDC provider login if no token is present. After successful login, the AngularJS application is loaded.

            My question is how to retrieve the token within the AngularJS client so that I can forward it to the API?

            ...

            ANSWER

            Answered 2020-May-21 at 06:38

            You can have mod_auth_openidc make the access token available to the AngularJS app through a header (see: https://github.com/zmartzone/mod_auth_openidc/issues/76) or on an endpoint (see: https://github.com/zmartzone/mod_auth_openidc/wiki/Single-Page-Applications#session-info).

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install mod_auth_openidc

            install and load mod_auth_openidc.so in your Apache server. configure your protected content/locations with AuthType openid-connect. set OIDCRedirectURI to a "vanity" URL within a location that is protected by mod_auth_openidc. register/generate a Client identifier and a secret with the OpenID Connect Provider and configure those in OIDCClientID and OIDCClientSecret respectively. and register the OIDCRedirectURI as the Redirect or Callback URI with your client at the Provider. configure OIDCProviderMetadataURL so it points to the Discovery metadata of your OpenID Connect Provider served on the .well-known/openid-configuration endpoint. configure a random password in OIDCCryptoPassphrase for session/state encryption purposes. For details on configuring multiple providers see the [Wiki](https://github.com/zmartzone/mod_auth_openidc/wiki/Multiple-Providers).
            install and load mod_auth_openidc.so in your Apache server
            configure your protected content/locations with AuthType openid-connect
            set OIDCRedirectURI to a "vanity" URL within a location that is protected by mod_auth_openidc
            register/generate a Client identifier and a secret with the OpenID Connect Provider and configure those in OIDCClientID and OIDCClientSecret respectively
            and register the OIDCRedirectURI as the Redirect or Callback URI with your client at the Provider
            configure OIDCProviderMetadataURL so it points to the Discovery metadata of your OpenID Connect Provider served on the .well-known/openid-configuration endpoint
            configure a random password in OIDCCryptoPassphrase for session/state encryption purposes
            See the [Wiki](https://github.com/zmartzone/mod_auth_openidc/wiki) for configuration docs for other OpenID Connect Providers: - [GLUU Server](https://github.com/zmartzone/mod_auth_openidc/wiki/Gluu-Server) - [Keycloak](https://github.com/zmartzone/mod_auth_openidc/wiki/Keycloak) - [Azure AD](https://github.com/zmartzone/mod_auth_openidc/wiki/Azure-Active-Directory-Authentication) - [Sign in with Apple](https://github.com/zmartzone/mod_auth_openidc/wiki/Sign-in-with-Apple) - [Curity Identity Server](https://github.com/zmartzone/mod_auth_openidc/wiki/Curity-Identity-Server) - [LemonLDAP::NG](https://github.com/zmartzone/mod_auth_openidc/wiki/LemonLDAP::NG) - [GitLab](https://github.com/zmartzone/mod_auth_openidc/wiki/GitLab-OAuth2) - [Globus](https://github.com/zmartzone/mod_auth_openidc/wiki/Globus) and [more](https://github.com/zmartzone/mod_auth_openidc/wiki/Useful-Links).

            Support

            Documentation can be found at the Wiki (including Frequently Asked Questions) at: [https://github.com/zmartzone/mod_auth_openidc/wiki](https://github.com/zmartzone/mod_auth_openidc/wiki) For questions, issues and suggestions use the Github Discussions forum at: [https://github.com/zmartzone/mod_auth_openidc/discussions](https://github.com/zmartzone/mod_auth_openidc/discussions). For commercial support contracts, professional services, training and use-case specific support please contact: [sales@zmartzone.eu](mailto:sales@zmartzone.eu).
            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/zmartzone/mod_auth_openidc.git

          • CLI

            gh repo clone zmartzone/mod_auth_openidc

          • sshUrl

            git@github.com:zmartzone/mod_auth_openidc.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 zmartzone

            liboauth2

            by zmartzoneC

            mod_token_binding

            by zmartzoneC

            liboauth2-sts

            by zmartzoneC