Automation Suite - Logging in to monitoring pages (https://monitoring.fqdn/metrics) returns 403 error

How to fix 403 error occuring in Automation Suite while logging in to monitoring pages (https://monitoring.fqdn/metrics)?

Issue Description

In Automation Suite, while trying to access https://monitoring.fqdn/metrics URL, a 403 error occurs:

Resolution

  1. First, check the pod logs using `kubectl logs -f` and `kubectl describe pod` for a pod named `auth-oauth2-proxy-xxxxx` under the `uipath-auth` namespace.

  2. Look for an error message like: `callback: token exchange failed: Post "https://monitoring.as.domain.com/dex/token": x509: certificate signed by unknown authority.`

  3. If the error matches, follow these steps:

    1. It seems the AS certificate has been updated to a company-issued or public certificate.

    2. Open the AS link in a browser, locate the root certificate, and export it to a `.crt` or `.cer` file.

    3. Move the exported certificate to the AS server nodes and place it in `/etc/pki/ca-trust/source/anchors`.

    4. Run `update-ca-trust` on all nodes.

    5. Return to any server node and use the `kubectl` command to restart the `auth-oauth2-proxy` deployment.

kubectl -n uipath-auth rollout restart deploy auth-oauth2-proxy

    1. Try logging in again using a fresh incognito window to access the monitoring pages.