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

Ruuter REST calls with dynamic request structures #271

Open
4 tasks
turnerrainer opened this issue Apr 11, 2024 · 0 comments · Fixed by #272
Open
4 tasks

Ruuter REST calls with dynamic request structures #271

turnerrainer opened this issue Apr 11, 2024 · 0 comments · Fixed by #272
Assignees
Labels

Comments

@turnerrainer
Copy link
Contributor

turnerrainer commented Apr 11, 2024

AS AN Architect
I WANT Ruuter to have the functionality to make REST calls with dynamic request structures when explicitly allowed
SO THAT Ruuter could make requests to any external endpoints without defining the request structure as part of Ruuter DSL

Acceptance Criteria

AS IS

The following is a default Ruuter DSL structure to make a REST call. It requires pre-defined request parameters within the args section for call: http.*

externalRequest:
  call: http.post
  args:
    url: https://some.external.service/and/its/endpoint
    body:
     locationName: ${incoming.body.list[1]}
     chatId: ${incoming.body.chatId}
     authorId: ${incoming.body.authorId}
  result: externalResponse
  next: end

TO BE

  • allowDynamicParameters has to be defined as true to explicitly allow dynamic request variables with the scope of this specific step only
  • When allowDynamicParameters: true is defined, this will generate WARN in logs to indicate that potentially insecure requests are made
  • Dynamic request parameters as passed to Ruuter as an array within the key dynamicParameters
  • dynamicParameters variables are mapped based on call type (http.post, http.get, etc.)
externalRequest:
  call: http.post
  args:
    url: https://some.external.service/and/its/endpoint
    body:
      dynamicParameters: true
      dynamicParameters: <whatever JSON object needed>
  result: externalResponse
  next: end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Acceptance Testing
Development

Successfully merging a pull request may close this issue.

2 participants