Class OpenIdConfiguration


  • public class OpenIdConfiguration
    extends Object
    Supports any standards compliant OpenID Connect provider as identity provider for LogEventsServlet.

    To set up authorization with Azure Active Directory

    This description assumes that you are member of an organization that uses Active Directory, but that you only want some users to have access to the LogEventsServlet.
    1. Go to the Azure portal and log in with your organization account
    2. Click "Create a resource" and enter "active directory" to create a new directory. You can name the directory what you want.
    3. You have to wait a little while for the directory to be created, then click the funnel + book icon to switch to your new directory
    4. Select "Azure Active Directory" from the menu in your new directory to go to directory management
    5. Select "App Registration" and "New registration" to create your application
    6. In the application configuration, you need to find the Application (client) ID, generate a new client secret (under Certificates and secrets) and setup your redirect URI (under Authentication) and use this to configure WebLogEventObserver
    7. Set observer.servlet.openIdIssuer=https://login.microsoftonline.com/{tenantId}/v2.0/
    8. In the Azure Active Directory menu, you can select "Users" and add a guest user from your organization to add to your limited Active Directory (this feature of Active Directory is known as B2B)
    9. In the Azure Active Directory menu, you can select "Enterprise Applications" to limited the users that can access the logging application

    To set up authorization with Google

    1. Go to Google API Console
    2. From the "Select a project" dropdown, click "New project"
    3. Select "Credentials" from the left menu, click "Create credentials" and select "OAuth client ID"
    4. Select "Web application" as the type of application and enter the Redirect URI where you would access your LogEventsServlet + "/oauth2callback" (e.g. https://myserver.com/myapp/logs/oauth2callback
    5. Copy the Client ID and Client secret to your observer.servlet.clientId and observer.servlet.clientSecret
    6. Set observer.servlet.openIdIssuer=https://accounts.google.com
    7. Important: Your log console is currently open to anyone with a Google Account, ie. everyone. You have to restrict it with e.g. observer.servlet.requiredClaim.email_verified=true and observer.servlet.requiredClaim.email=alice@example.com, bob@example.com
    • Constructor Detail

      • OpenIdConfiguration

        public OpenIdConfiguration​(Configuration configuration)
      • OpenIdConfiguration

        public OpenIdConfiguration​(String openIdIssuer,
                                   String clientId,
                                   String clientSecret)