Restoring access when an external service fails
На этой странице
Let’s say that in the Shturval platform you have connected an external service for authentication, for example, Keycloak or Blitz (see connection instructions). There are situations when a failure may occur on the side of the external authentication service. In this case, it is possible to disable the external authentication service and restore access to the platform for all users.
To ensure that work in the platform is not interrupted if an external service fails, run:
- Connect to the management cluster using kubeconfig received during platform installation. Kubeconfig can also be taken from the Control Plane of the platform node
/etc/kubernetes/admin.conf.
- In Secret
auth-provider, change the value of theactiveparameter tofalse.
Team — illustration
kubectl patch secret auth-provider -n shturval-backend --type=merge -p '{"stringData":{"active":"false"}}'
The command uses stringData, so the value of false does not need to be base64 encoded. The command will only change the active parameter; the external_idp and skip_internal_auth parameters do not need to be redefined.
- Check that Secret is set to
false.
Team — illustration
kubectl get secret auth-provider -n shturval-backend -o jsonpath='{.data.active}' | base64 --decode
The command should return the value false.
- Prepare a YAML file, for example, named shturval-auth.yaml with an object manifest ShturvalServicePatch (ShturvalServicePatch) to apply to the specification (ssc)
shturval-auth. In ShturvalServicePatch, specifyfalsein theAUTH_IDP_ACTIVEparameter and set the application priority in theorderparameter, as in the example below.
Example ShturvalServicePatch
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
name: shturval-auth-disable
spec:
shturvalServiceConfigName: shturval-auth
patchOrder: 1
custom values:
AUTH_IDP_ACTIVE: false
- Apply the changes.
Team — illustration
kubectl apply -f SPECIFY-MANIFEST-FILE-ShturvalServicePatch
An example manifest file name is shturval-auth-disable.yaml.
- Once the changes are applied, authentication should work correctly.