Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

TT-159 tyk-sync not preserving default policy for jwt authentication #44

Closed
chris-fewtrell opened this issue Jul 30, 2020 · 2 comments
Closed

Comments

@chris-fewtrell
Copy link

Describe the bug
When dumping and publishing an API with JWT Authentication and a default policy set, the default policy is lost, resulting with an API with different behavior vs source.

API is left in a state where Dashboard will not save any Default Policy to the JWT Authentication method (either through editing with the UI, or editing the API Definition in the editor).

Reproduction steps
Steps to reproduce the behavior:

Starting with newly setup and bootstrapped environment (Dashboard v1.9.4.1, Gateway v2.9.4.1)

  1. Create new JWT Authenticated API in Dashboard
  2. Create new policy to grant access to new API
  3. Assign policy to API as default policy under JWT authentication method
  4. tyk-sync dump APIs to local git repo
  5. Wipe the dashboard/gateway setup, and re-bootstrap the environment
  6. tyk-sync publish the previously dumped APIs and Policies - new API and policy report success on upload
  7. View uploaded API in dashboard, jwt authentication method is set, however default policy is not specified (uploaded policy has been created however)
  8. Attempt to set JWT Auth default policy, update API, and return to API List
  9. View API again, default policy is still unset (can also try setting default policy and viewing definition after update and JSON for jwt_default_policies is an empty array)

In addition, can attempt to correct by setting the default policy in the jwt authentication and clicking "Update" to persist the change, however this never persists. While visible as set in the UI, when the API is revisited, or the API Definition is viewed, the jwt default policy is not set, and returning to the API settings shows the default policy is again unset, as if the update/save didn't work.

Expected behavior
When tyk-sync publish occurs, jwt authenticated API is published with default policy specified and intact enabling expected behavior.

Tyk Ticket Ref: 10722

@chris-fewtrell
Copy link
Author

Further testing, running dump using a v3.0 source dashboard, and publishing to v1.9.4.1 Dashboard using same process as above, results are the same.

@gregdelhon gregdelhon changed the title tyk-sync not preserving default policy for jwt authentication TT-159 tyk-sync not preserving default policy for jwt authentication Sep 2, 2020
@caroltyk
Copy link
Contributor

Fixed and not reproducible

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants