> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/troubleshooting-and-resources/armory/how-tos/how-to-disable-security-authn-and-authz-for-spinnaker-migration-testing.md).

# How to disable security (Authn and Authz) for Spinnaker Migration testing

### Introduction <a href="#introduction" id="introduction"></a>

When admins are testing migration of their production Spinnaker instance to a new cluster or environment, they may need to do some testing on the new environment without the production security permissions in place. (ex: OKTA, SAML, LDAP) If users were to try testing the pipelines or Spinnaker UI in the new environment, Spinnaker may throw permissions errors or the new environment may not be accessible.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Access to the current Spinnaker instance configuration

### Instructions <a href="#instructions" id="instructions"></a>

In order to make sure the testing and the new instance can be access and used without any permission concerns is to comment out the `security` sections in the `Kustomize.yml` except for the `security/patch-gate-tomcat-headers.yml` if it is being used in the environment. Depending on what the administrators specifically has set up for security, the admins may also need to comment out portions of the `gate` and `SpinnakerService` settings. Here is an example config where ***Authn*** and ***x509*** are commented out in `SpinnakerService.yml`

```
#-----------------------------------------------------------------------------------------------------------------
# Example configuration for exposing spinnaker with NodePort Kubernetes services <a href="#example-configuration-for-exposing-spinnaker-with-nodeport-kubernetes-services" id="example-configuration-for-exposing-spinnaker-with-nodeport-kubernetes-services"></a>
#-----------------------------------------------------------------------------------------------------------------
apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
  name: spinnaker
spec:
  spinnakerConfig:
    config:
      security:
        apiSecurity:
          overrideBaseUrl: https://minnaker.us-east-1.elb.amazonaws.com:8084
          ssl:
            enabled: true
            keyAlias: gate
            keyStore: encryptedFile.jks
            keyStoreType: jks
            keyStorePassword: spinnaker # The password to unlock your keystore. Due to a limitation in Tomcat, this must match your key's password in the keystore.
# trustStore: encryptedFile.jks <a href="#truststore-encryptedfilejks" id="truststore-encryptedfilejks"></a>
# trustStoreType: jks <a href="#truststoretype-jks" id="truststoretype-jks"></a>
# trustStorePassword: spinnaker # The password to unlock your truststore. <a href="#truststorepassword-spinnaker-the-password-to-unlock-your-truststore" id="truststorepassword-spinnaker-the-password-to-unlock-your-truststore"></a>
# clientAuth: WANT # Declare 'WANT' when client auth is wanted but not mandatory, or 'NEED', when client auth is mandatory. <a href="#clientauth-want-declare-want-when-client-auth-is-wanted-but-not-mandatory-or-need-when-client-auth-is-mandatory" id="clientauth-want-declare-want-when-client-auth-is-wanted-but-not-mandatory-or-need-when-client-auth-is-mandatory"></a>
        uiSecurity:
          overrideBaseUrl: https://minnaker.us-east-1.elb.amazonaws.com:9000
          ssl:
            enabled: true
            sslCertificateFile: encryptedFile.crt
            sslCertificateKeyFile: encryptedFile.key
            sslCertificatePassphrase: spinnaker # Your passphrase
# authn: <a href="#authn" id="authn"></a>
# x509: <a href="#x509" id="x509"></a>
# enabled: true <a href="#enabled-true" id="enabled-true"></a>
# roleOid: 1.2.840.10070.8.1 <a href="#roleoid-128401007081" id="roleoid-128401007081"></a>
# subjectPrincipalRegex: EMAILADDRESS=(.*?)(?:,|$) <a href="#subjectprincipalregex-emailaddressordollar" id="subjectprincipalregex-emailaddressordollar"></a>
# profiles: <a href="#profiles" id="profiles"></a>
# gate: <a href="#gate" id="gate"></a>
# default: <a href="#default" id="default"></a>
# apiPort: 8085 <a href="#apiport-8085" id="apiport-8085"></a>

  kustomize:
    deck:
      service:
        patches:
          - |
            spec:
              type: NodePort
              ports:
              - name: http
                port: 9000
                targetPort: 9000
                nodePort: 30000
    gate:
      service:
        patches:
        - |
          spec:
            type: NodePort
            ports:
            - name: http
              port: 8084
              targetPort: 8084
              nodePort: 30084
# - name: x509 <a href="#name-x509" id="name-x509"></a>
# port: 8085 <a href="#port-8085" id="port-8085"></a>
# targetPort: 8085 <a href="#targetport-8085" id="targetport-8085"></a>
# nodePort: 30085 <a href="#nodeport-30085" id="nodeport-30085"></a>
```
