Skip to content
New issue

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

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

Already on GitHub? # to your account

Onboarding and routing to a service with invalid serviceId #3844

Open
pj892031 opened this issue Oct 10, 2024 · 0 comments
Open

Onboarding and routing to a service with invalid serviceId #3844

pj892031 opened this issue Oct 10, 2024 · 0 comments
Labels
bug Verified defect in functionality Priority: High size/M

Comments

@pj892031
Copy link
Contributor

Describe the bug

The invalid serviceId (against the conformance) has an unexpected behavior.

Steps to Reproduce

  1. register a service with serviceId service_test
  2. try to call an endpoint ie. /service_test/api/v1
  3. the response is 500

Expected behavior
It should route well or inform about wrong inputs

The root cause is that GW uses a load balancer. To identify the instance it uses a URI like lb://service_test. During the processing by the load balancer, it is necessary to parse the URI and it is a problem because the URI is not valid (for _ character - https://www.ietf.org/rfc/rfc0952.txt). It leads to internal server error 500.

Possible solution:

  1. reject onboarding with invalid serviceId (or potentially other values)
  • the DS could return 400 in this case
  • if the service logs the reason for error it could be displayed
  1. rename serviceId internally
  • use as service ID encoded string (ie by using -)
  • we need to provide the original serviceId in metadata to be possible to construct url for a routing rule
  1. update enabler to verify this value and at least log warn message or rather stop onboarding process

Details

  • Version and build number: 3.0.0
@pj892031 pj892031 added bug Verified defect in functionality new New issue that has not been worked on yet labels Oct 10, 2024
@EvaJavornicka EvaJavornicka added Priority: High size/M and removed new New issue that has not been worked on yet labels Oct 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Verified defect in functionality Priority: High size/M
Projects
Status: Unplanned Bugs
Development

No branches or pull requests

2 participants