At the time of writing, there is a known issue that may cause an error when creating new clients for OAuth2-secured APIs deployed using the Tyk Operator. You may encounter a problem similar to the one shown below:
Workaround
To resolve this issue, update the SecurityPolicy YAML to include the policy ID displayed in the Tyk Dashboard, and apply it.
1. Retrieve the Policy ID from the Dashboard
2. Add the id field to the policy YAML
3. Apply the updated policy YAML.
Example: Original Policy YAML (Before Fix)
apiVersion: tyk.tyk.io/v1alpha1
kind: SecurityPolicy
metadata:
name: oauth-api-policy
namespace: default
spec:
access_rights_array:
- name: oauth-api
namespace: default
versions:
- Default
active: true
name: oauth-api-policy
state: active
Updated Policy YAML (With Fix)
apiVersion: tyk.tyk.io/v1alpha1
kind: SecurityPolicy
metadata:
name: oauth-api-policy
namespace: default
spec:
id: < Policy ID from the Dashboard > #add this line
access_rights_array:
- name: oauth-api
namespace: default
versions:
- Default
active: true
name: oauth-api-policy
state: active
This approach is similar to migrating an existing policy.
Comments
0 comments
Please sign in to leave a comment.