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

Portainer Edge Agent security #187

Closed
c3c opened this issue May 15, 2021 · 2 comments
Closed

Portainer Edge Agent security #187

c3c opened this issue May 15, 2021 · 2 comments
Milestone

Comments

@c3c
Copy link

c3c commented May 15, 2021

Looking at the source code of Portainer Agent in Edge mode, it seems like it will always start the HTTP API in insecure mode.
https://github.com/portainer/agent/blob/develop/cmd/agent/main.go#L240-L241

While the regular Portainer Agent can require Mutual TLS, I don't see this option for Portainer Edge Agent.

Doesn't this mean that anyone on the bridge network (i.e. other containers) and other processes on the host can reach the Agent API interface (even when it's not EXPOSE'd) when it's in Edge mode? Considering containers can get compromised, wouldn't that introduce a security risk?

@deviantony
Copy link
Member

Hi @c3c,

You are right, even if this was originally by design when we created the Edge agent with Swarm in mind: https://github.com/portainer/agent#api-server

We did not consider this as a problem when we open up support for the Edge agent on Docker standalone but we do think that this might lead to a security issue (even when running the agent in a Swarm cluster actually).

We're currently looking into this and one potential solution would be to re-use the Authentication mechanism of the regular agent mode (https://github.com/portainer/agent#authentication) without the HTTPS layer.

@huib-portainer
Copy link

More details in portainer/portainer#5498

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

No branches or pull requests

3 participants