Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service instance proxy V2 #2692

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Conversation

wpjunior
Copy link
Member

@wpjunior wpjunior commented Apr 24, 2024

The Tsuru has a way to proxy requests to a backend of service instance, nowadays is:

/services/<SERVICE>/proxy/<INSTANCE>?callback=%2Fresources%2F<INSTANCE>%2F<CUSTOM_PATH>

why evolve to a new model?

  • repeat on callback querystring is a little redundant
  • user could escape to a instance that does not have permission, i. e: /services/<SERVICE>/proxy/instance-a?callback=%2Fresources%2Finstance-b%2Finfo
  • simplify clients codebase.

proposal:
new proxy API with same permission model, but with a syntax sugar:

/1.20/services/<SERVICE>/resources/<INSTANCE>/<CUSTOM_PATH>

this model ensure easy way to interoperate trough tsuru api and directly access.

ex:

@wpjunior wpjunior marked this pull request as ready for review April 25, 2024 12:08
@wpjunior wpjunior merged commit 7255c58 into tsuru:main Apr 25, 2024
12 checks passed
@wpjunior wpjunior deleted the feat/service-instance-proxy-v2 branch April 25, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant