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

Option to allow HTTP request to host running the current application #957

Closed
radu-matei opened this issue Dec 11, 2022 · 3 comments · Fixed by #1710
Closed

Option to allow HTTP request to host running the current application #957

radu-matei opened this issue Dec 11, 2022 · 3 comments · Fixed by #1710
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@radu-matei
Copy link
Member

I am trying to build the following scenario: I have two components, and am trying to make requests from one to the other.

Because I don't know the actual URL the application will be available at before hand, every time the application is moved I need to change the allowed_http_hosts configuration if I want to continue to be able to send request to another component of the same application.

There are two options I see:

  • always allow requests to component of the same application
  • similar to the insecure:allow-all option, add a self option
@radu-matei radu-matei added the enhancement New feature or request label Dec 11, 2022
@michelleN michelleN moved this to 🆕 Triage Needed in Spin Triage Dec 12, 2022
@dicej dicej moved this from 🆕 Triage Needed to 🔖 Backlog in Spin Triage Jan 5, 2023
@radu-matei
Copy link
Member Author

Expanding on this issue a bit more, here is where I am currently at:

  • requests to components of the same application should be allowed by default
  • we should enable outbound HTTP calls to /component-1 to expand to https://<full url where the application is running at>/component-1

@michelleN
Copy link
Collaborator

requests to components of the same application should be allowed by default

Do we want to restrict which components can requests to each other in the future or do we recommend people use the Spin application boundary for that (i.e if you want to restrict access, create a new Spin app for that component)?

@itowlson
Copy link
Collaborator

Arguably the component model way of looking at the world is "if you want to use the thing then you have to declare the thing as an import"; on the other hand, for HTTP, we do permissions at the host level, which would suggest the application as a boundary.

michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
    + add ability for one component to make outbound calls
    to another component in the same Spin app
    + update example for rust outbound http to demonstrate capability
    + adds e2e
    + resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 26, 2023
+ add ability for one component to make outbound calls
  to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 29, 2023
+ add ability for one component to make outbound calls
  to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 29, 2023
+ add ability for one component to make outbound calls
  to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 30, 2023
+ add ability for one component to make outbound calls
  to another component in the same Spin app
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self.local` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self.local is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves spinframework#957
+ resolves spinframework#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Spin Triage Sep 5, 2023
@melissaklein24 melissaklein24 modified the milestones: 1.6.0, 1.5.0 Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants