Child pages
  • Instructions to setup the OIDC flow

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. The OIDC handler bundle requires a number of external dependencies. The simplest way to install them is to drop an additional provisioning model file the Sling Starter application and rebuild it, for instance at src/main/provisioning/oidc.txt:

    Code Block
    languagetext
    titleoidc.txt
    #
    #  Licensed to the Apache Software Foundation (ASF) under one
    #  or more contributor license agreements.  See the NOTICE file
    #  distributed with this work for additional information
    #  regarding copyright ownership.  The ASF licenses this file
    #  to you under the Apache License, Version 2.0 (the
    #  "License"); you may not use this file except in compliance
    #  with the License.  You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    #  Unless required by applicable law or agreed to in writing,
    #  software distributed under the License is distributed on an
    #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    #  KIND, either express or implied.  See the License for the
    #  specific language governing permissions and limitations
    #  under the License.
    #
    #
    [feature name=oidc]
    
    [artifacts]
        net.minidev/accessors-smart/1.2
        net.minidev/json-smart/2.3
        com.nimbusds/nimbus-jose-jwt/5.12
        com.nimbusds/lang-tag/1.4.3
        com.nimbusds/oauth2-oidc-sdk/5.62
        org.ow2.asm/asm/5.2
        org.apache.servicemix.bundles/org.apache.servicemix.bundles.jcip-annotations/1.0_2
    
    
    


  2. When creating the Sling instance whitelist "org.apache.sling.jcr.api".
  3. Install the OIDC Handler bundle https://github.com/apache/sling-whiteboard/pull/14
  4. Install the Sling instance in the Google API. (Refer:  https://developers.google.com/identity/protocols/OpenIDConnect)
    1. callbackURL : "http://localhost:8080/auth/oidc"
  5. Start the server
  6. Go to http://localhost:8080/system/console/configMgr
  7. Select " Google - OpenID Connect Configuration" and fill the required values and save.
  8. Go to localhost:8080/auth/login
  9. Then you will be redirected to Google login page. Give your credentials and consent when required.
  10. If the authentication is successful you will be successfully logged in to Sling.