Enable debugging for user authentication issues
Enable debugging for platform-auth-service Liberty to get trace logs for debugging user authentication issues.
The configuration parameter is LIBERTY_DEBUG_ENABLED. The default value is LIBERTY_DEBUG_ENABLED: false.
Set the LIBERTY_DEBUG_ENABLED parameter value to true or false.
Following are the steps to change the value:
Changing the parameter value by using kubectl
-
Set up the
kubectlCLI. For more information, see Installing the Kubernetes CLI (kubectl). -
Edit the
platform-auth-idpconfigmap.kubectl -n kube-system edit configmap platform-auth-idp -
Set
LIBERTY_DEBUG_ENABLEDtotrueorfalse. -
Save and close the configmap.
-
Restart the
auth-idppodskubectl -n kube-system delete pod -l k8s-app=auth-idp -
Wait for some time. Then, check the status of the
auth-idppods. The status must show as4/4 Runningfor all the pods.kubectl -n kube-system get pods | grep auth-idp
Changing the parameter values by using the management console
- Log in to the console as a user with cluster administrator access.
- From the navigation menu, click Configuration > ConfigMaps.
- Search for
platform-auth-idp. - Click ... >
Edit. - Change the
LIBERTY_DEBUG_ENABLEDparameter value totrueorfalse. - Click Submit.
- From the navigation menu, click Workloads > DaemonSets.
- Locate
auth-idp. - Click ... >
Edit. AEdit DaemonSetwindow opens. - Click Submit without making any change. This step is to reload the
auth-idppods with the most recent configmap values. - Click
auth-idp. - Wait for some time. Then, check the status of the
auth-idppods in the Pods pane. The status of all the pods must show as4/4under the Ready field name.
Getting the logs
Log in to your IBM® Cloud Private cluster by using the management console or the IBM Cloud Private CLI a few times to generate logs. For more information about installing the IBM Cloud Private CLI, see Installing
the IBM® Cloud Private CLI.
Complete the following steps to get all auth-idp pod's platform-auth-service container Liberty logs:
-
Set up the kubectl CLI. For more information, see Installing the Kubernetes CLI (kubectl).
-
Create a script, for example,
get_auth_service_logs.shand add the following code.#!/bin/bash for pod in $(kubectl -n kube-system get pods -l component=auth-idp --no-headers -o custom-columns=name:.metadata.name); do echo "===== $pod =====" sudo mkdir $pod kubectl -n kube-system cp $pod:/logs -c platform-auth-service ./$pod/ kubectl -n kube-system cp $pod:/opt/ibm/auth-service/logs -c platform-auth-service ./$pod/ done tar czf auth_service_liberty_logs.tgz ./auth-idp* rm -rf ./auth-idp* -
Set the execution permissions and run the script to get logs. For example,
chmod +x get_auth_service_logs.sh ./get_auth_service_logs.shAn archive file named,
auth_service_liberty_logs.tgzis created.