---
title: "Update App Auth Strategy"
url: "https://nov18-dev.movespot.fyi/apis/konnect-application-auth-strategies-2/versions/bd73d053-0812-4727-92b1-ce07bee7e3a8/operations/update-app-auth-strategy"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-application-auth-strategies-2/versions/bd73d053-0812-4727-92b1-ce07bee7e3a8.md

# Update App Auth Strategy

`PATCH` `/application-auth-strategies/{authStrategyId}`

Operation ID: `update-app-auth-strategy`

Updates an application auth strategy.

## Path parameters

- `authStrategyId` (string, uuid, required) - Application auth strategy identifier

## Request body (required)

Content types: `application/json`

## Responses

- `200` - A response containing a single updated application auth strategy object.
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Application Auth Strategies
  version: 2.0.6
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /application-auth-strategies/{authStrategyId}:
    parameters:
      - $ref: "#/components/parameters/AuthStrategyId"
    patch:
      operationId: update-app-auth-strategy
      summary: Update App Auth Strategy
      description: Updates an application auth strategy.
      requestBody:
        $ref: "#/components/requestBodies/UpdateAppAuthStrategy"
      responses:
        "200":
          $ref: "#/components/responses/UpdateAppAuthStrategy"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - App Auth Strategies
components:
  parameters:
    AuthStrategyId:
      name: authStrategyId
      description: Application auth strategy identifier
      in: path
      required: true
      schema:
        $ref: "#/components/schemas/UUID"
  requestBodies:
    UpdateAppAuthStrategy:
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/UpdateAppAuthStrategyRequest"
          examples:
            UpdateAppAuthStrategyKeyAuthRequest:
              $ref: "#/components/examples/UpdateAppAuthStrategyKeyAuthRequest"
            UpdateAppAuthStrategyOpenIDConnectRequest:
              $ref: "#/components/examples/UpdateAppAuthStrategyOpenIDConnectRequest"
  responses:
    UpdateAppAuthStrategy:
      description: A response containing a single updated application auth strategy object.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/UpdateAppAuthStrategyResponse"
          examples:
            AppAuthStrategyResponseExample1:
              $ref: "#/components/examples/AppAuthStrategyResponseExample1"
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/BadRequestError"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  schemas:
    UUID:
      description: Contains a unique identifier used for this resource.
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
      readOnly: true
    UpdateAppAuthStrategyRequest:
      description: Request body for updating an Application Auth Strategy
      type: object
      properties:
        name:
          $ref: "#/components/schemas/AuthStrategyName"
        display_name:
          $ref: "#/components/schemas/AuthStrategyDisplayName"
        labels:
          $ref: "#/components/schemas/LabelsUpdate"
        dcr_provider_id:
          type: string
          format: uuid
          nullable: true
        configs:
          description: JSON-B object containing the configuration for the OIDC strategy
            under the key 'openid-connect' or the configuration for the Key Auth
            strategy under the key 'key-auth'
          type: object
          oneOf:
            - $ref: "#/components/schemas/UpdateAppAuthStrategyRequestOpenIdConnect"
            - $ref: "#/components/schemas/UpdateAppAuthStrategyRequestKeyAuth"
      additionalProperties: false
      title: UpdateAppAuthStrategyRequest
    UpdateAppAuthStrategyResponse:
      $ref: "#/components/schemas/AppAuthStrategy"
    BadRequestError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          required:
            - invalid_parameters
          properties:
            invalid_parameters:
              $ref: "#/components/schemas/InvalidParameters"
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    AuthStrategyName:
      description: >
        The name of the auth strategy. This is used to identify the auth
        strategy in the Konnect UI.
      type: string
      maxLength: 256
      minLength: 1
    AuthStrategyDisplayName:
      description: >
        The display name of the Auth strategy. This is used to identify the Auth
        strategy in the Portal UI.
      type: string
      maxLength: 256
    LabelsUpdate:
      description: >
        Labels store metadata of an entity that can be used for filtering an
        entity list or for searching across entity types. 


        Labels are intended to store **INTERNAL** metadata.


        Keys must be of length 1-63 characters, and cannot start with "kong",
        "konnect", "mesh", "kic", or "_".
      type: object
      example:
        env: test
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
        nullable: true
      maxProperties: 50
      nullable: true
      writeOnly: true
    UpdateAppAuthStrategyRequestOpenIdConnect:
      type: object
      properties:
        openid-connect:
          $ref: "#/components/schemas/PartialAppAuthStrategyConfigOpenIDConnect"
      additionalProperties: false
      required:
        - openid-connect
    UpdateAppAuthStrategyRequestKeyAuth:
      type: object
      properties:
        key-auth:
          $ref: "#/components/schemas/PartialAppAuthStrategyConfigKeyAuth"
      additionalProperties: false
      required:
        - key-auth
    AppAuthStrategy:
      description: A set of plugin configurations that represent how the gateway will
        perform authentication and authorization for a Product Version. Called
        “Auth Strategy” for short in the context of portals/applications. The
        plugins are synced to any Gateway Service that is currently linked or
        becomes linked to the Product Version.
      type: object
      discriminator:
        propertyName: strategy_type
        mapping:
          key_auth: "#/components/schemas/AppAuthStrategyKeyAuthResponse"
          openid_connect: "#/components/schemas/AppAuthStrategyOpenIDConnectResponse"
      oneOf:
        - $ref: "#/components/schemas/AppAuthStrategyKeyAuthResponse"
        - $ref: "#/components/schemas/AppAuthStrategyOpenIDConnectResponse"
      required:
        - strategy_type
      title: AppAuthStrategy
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    InvalidParameters:
      description: invalid parameters
      type: array
      items:
        oneOf:
          - $ref: "#/components/schemas/InvalidParameterStandard"
          - $ref: "#/components/schemas/InvalidParameterMinimumLength"
          - $ref: "#/components/schemas/InvalidParameterMaximumLength"
          - $ref: "#/components/schemas/InvalidParameterChoiceItem"
          - $ref: "#/components/schemas/InvalidParameterDependentItem"
      minItems: 1
      nullable: false
      uniqueItems: true
    PartialAppAuthStrategyConfigOpenIDConnect:
      description: >
        A more advanced mode to configure an API Product Version’s Application
        Auth Strategy. 

        Using this mode will allow developers to use API credentials issued from
        an external IdP that will authenticate their application requests. 

        Once authenticated, an application will be granted access to any Product
        Version it is registered for that is configured for the same Auth
        Strategy. 

        An OIDC strategy may be used in conjunction with a DCR provider to
        automatically create the IdP application.
      type: object
      properties:
        issuer:
          type: string
          format: url
          maxLength: 256
        credential_claim:
          type: array
          items:
            type: string
            maxLength: 128
          maxItems: 10
        scopes:
          type: array
          items:
            type: string
            maxLength: 128
          maxItems: 50
        auth_methods:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 10
      additionalProperties: true
      title: PartialAppAuthStrategyConfigOpenIDConnect
    PartialAppAuthStrategyConfigKeyAuth:
      description: |
        Key Auth configuration for updating an Application Auth Strategy.
        The ttl field can be set to null to unset the Time-To-Live.
      type: object
      properties:
        key_names:
          description: The names of the headers containing the API key. You can specify
            multiple header names.
          type: array
          items:
            type: string
            maxLength: 256
          maxItems: 10
          minItems: 1
        ttl:
          description: Default maximum Time-To-Live for keys created under this strategy.
            Set to null to unset.
          type: object
          nullable: true
          properties:
            value:
              type: integer
              minimum: 1
            unit:
              type: string
              enum:
                - days
                - weeks
                - years
          required:
            - value
            - unit
      additionalProperties: false
      title: PartialAppAuthStrategyConfigKeyAuth
    AppAuthStrategyKeyAuthResponse:
      description: Response payload from creating or updating a Key Auth Application
        Auth Strategy
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        name:
          $ref: "#/components/schemas/AuthStrategyName"
        display_name:
          $ref: "#/components/schemas/AuthStrategyDisplayName"
        strategy_type:
          type: string
          enum:
            - key_auth
        configs:
          description: JSON-B object containing the configuration for the Key Auth strategy
          type: object
          additionalProperties: false
          properties:
            key-auth:
              $ref: "#/components/schemas/AppAuthStrategyConfigKeyAuth"
          required:
            - key-auth
        active:
          description: At least one published entity is using this auth strategy.
          type: boolean
        dcr_provider:
          type: object
          additionalProperties: false
          nullable: true
          properties:
            id:
              $ref: "#/components/schemas/UUID"
            name:
              type: string
            display_name:
              $ref: "#/components/schemas/DcrProviderDisplayName"
            provider_type:
              description: The type of DCR provider.
              type: string
              enum:
                - auth0
                - azureAd
                - curity
                - okta
                - http
          required:
            - id
            - name
            - provider_type
        labels:
          $ref: "#/components/schemas/Labels"
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
        supports_multiple_credentials:
          description: |
            Indicates whether this auth strategy supports multiple credentials.
            Always `true` for KEY_AUTH.
          type: boolean
          default: true
          readOnly: true
      additionalProperties: false
      required:
        - id
        - name
        - display_name
        - strategy_type
        - configs
        - active
        - dcr_provider
        - labels
        - created_at
        - updated_at
      title: AppAuthStrategyKeyAuthResponse
    AppAuthStrategyOpenIDConnectResponse:
      description: Response payload from creating an OIDC Application Auth Strategy
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        name:
          $ref: "#/components/schemas/AuthStrategyName"
        display_name:
          $ref: "#/components/schemas/AuthStrategyDisplayName"
        strategy_type:
          type: string
          enum:
            - openid_connect
        configs:
          description: JSON-B object containing the configuration for the OIDC strategy
          type: object
          additionalProperties: false
          properties:
            openid-connect:
              $ref: "#/components/schemas/AppAuthStrategyConfigOpenIDConnect"
          required:
            - openid-connect
        active:
          description: At least one published entity is using this auth strategy.
          type: boolean
        dcr_provider:
          type: object
          additionalProperties: false
          nullable: true
          properties:
            id:
              $ref: "#/components/schemas/UUID"
            name:
              type: string
            display_name:
              $ref: "#/components/schemas/DcrProviderDisplayName"
            provider_type:
              description: The type of DCR provider.
              type: string
              enum:
                - auth0
                - azureAd
                - curity
                - okta
                - http
          required:
            - id
            - name
            - provider_type
        labels:
          $ref: "#/components/schemas/Labels"
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
        supports_multiple_credentials:
          description: >
            Indicates whether this auth strategy supports multiple credentials.

            - `true` for Key Auth strategies and when supported for Client
            Credentials strategies

            - `false` when not supported for Client Credentials strategies
          type: boolean
          readOnly: true
      additionalProperties: false
      required:
        - id
        - name
        - display_name
        - strategy_type
        - configs
        - active
        - dcr_provider
        - labels
        - created_at
        - updated_at
      title: AppAuthStrategyOpenIDConnectResponse
    InvalidParameterStandard:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          $ref: "#/components/schemas/InvalidRules"
        source:
          type: string
          example: body
        reason:
          type: string
          example: is a required field
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
    InvalidParameterMinimumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - min_length
            - min_digits
            - min_lowercase
            - min_uppercase
            - min_symbols
            - min_items
            - min
          nullable: false
          readOnly: true
        minimum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must have at least 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - minimum
    InvalidParameterMaximumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - max_length
            - max_items
            - max
          nullable: false
          readOnly: true
        maximum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must not have more than 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - maximum
    InvalidParameterChoiceItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - enum
          nullable: false
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        choices:
          type: array
          items: {}
          minItems: 1
          nullable: false
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - choices
    InvalidParameterDependentItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - dependent_fields
          nullable: true
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        dependents:
          type: array
          items: {}
          nullable: true
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - rule
        - reason
        - dependents
    AppAuthStrategyConfigKeyAuth:
      description: >
        The most basic mode to configure an Application Auth Strategy for an API
        Product Version. 

        Using this mode will allow developers to generate API keys that will
        authenticate their application requests. 

        Once authenticated, an application will be granted access to any Product
        Version it is registered for that is configured for Key Auth.
      type: object
      properties:
        key_names:
          description: The names of the headers containing the API key. You can specify
            multiple header names.
          type: array
          items:
            type: string
            maxLength: 256
          maxItems: 10
          minItems: 1
        ttl:
          description: Default maximum Time-To-Live for keys created under this strategy.
          type: object
          properties:
            value:
              type: integer
              minimum: 1
            unit:
              type: string
              enum:
                - days
                - weeks
                - years
          required:
            - value
            - unit
      additionalProperties: false
      title: AppAuthStrategyConfigKeyAuth
    DcrProviderDisplayName:
      description: >
        The display name of the DCR provider. This is used to identify the DCR
        provider in the Portal UI.
      type: string
      maxLength: 256
      minLength: 1
    Labels:
      description: >
        Labels store metadata of an entity that can be used for filtering an
        entity list or for searching across entity types. 


        Keys must be of length 1-63 characters, and cannot start with "kong",
        "konnect", "mesh", "kic", or "_".
      type: object
      example:
        env: test
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
      maxProperties: 50
      title: Labels
    CreatedAt:
      description: An ISO-8601 timestamp representation of entity creation date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    UpdatedAt:
      description: An ISO-8601 timestamp representation of entity update date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    AppAuthStrategyConfigOpenIDConnect:
      description: >
        A more advanced mode to configure an API Product Version’s Application
        Auth Strategy. 

        Using this mode will allow developers to use API credentials issued from
        an external IdP that will authenticate their application requests. 

        Once authenticated, an application will be granted access to any Product
        Version it is registered for that is configured for the same Auth
        Strategy. 

        An OIDC strategy may be used in conjunction with a DCR provider to
        automatically create the IdP application.
      type: object
      properties:
        issuer:
          type: string
          format: url
          maxLength: 256
        credential_claim:
          type: array
          items:
            type: string
            maxLength: 128
          maxItems: 10
        scopes:
          type: array
          items:
            type: string
            maxLength: 128
          maxItems: 50
        auth_methods:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 10
      additionalProperties: true
      required:
        - issuer
        - credential_claim
        - scopes
        - auth_methods
      title: AppAuthStrategyConfigOpenIDConnect
    InvalidRules:
      description: invalid parameters rules
      type: string
      enum:
        - required
        - is_array
        - is_base64
        - is_boolean
        - is_date_time
        - is_integer
        - is_null
        - is_number
        - is_object
        - is_string
        - is_uuid
        - is_fqdn
        - is_arn
        - unknown_property
        - missing_reference
        - is_label
        - matches_regex
        - invalid
        - is_supported_network_availability_zone_list
        - is_supported_network_cidr_block
        - is_supported_provider_region
        - type
      nullable: true
      readOnly: true
  examples:
    UpdateAppAuthStrategyKeyAuthRequest:
      value:
        display_name: API Key
    UpdateAppAuthStrategyOpenIDConnectRequest:
      value:
        display_name: Client Credentials
    AppAuthStrategyResponseExample1:
      value:
        id: 22f8380e-7798-4566-99e3-2edf2b57d289
        name: auth strategy 1
        display_name: Client Credentials
        strategy_type: openid_connect
        active: false
        configs:
          openid-connect:
            issuer: https://my-issuer.example.com/default
            auth_methods:
              - client_credentials
            credential_claim:
              - client_id
            scopes:
              - openid
              - email
        dcr_provider:
          id: 33f8380e-7798-4566-99e3-2edf2b57d289
          name: DCR provider 1
          display_name: Credentials
          provider_type: http
        labels: {}
        created_at: 2023-01-01T00:00:00.000Z
        updated_at: 2023-01-01T00:00:00.000Z
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
```
