Skip to content

ateapi: require an egress gateway address - #1717

Open
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:egress-gateway-required
Open

haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:egress-gateway-required

Conversation

@haiyanmeng

@haiyanmeng haiyanmeng commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

--egress-gateway-address of ate-api-server defaulted to empty, and empty meant ateapi sent no EgressGateway to atelet. An actor started that way installs no nftables redirect and leaves on the masquerade path, so it never reaches the PEP and its EgressPolicy is silently unenforced. A cluster could land there by omitting one flag, with nothing in the logs to say policy had stopped applying.

Refuse to start when the flag is empty. Every in-tree deployment already sets it, so this only closes the misconfiguration.

The downstream handling of an absent gateway is left in place: this makes the untunneled path unreachable by configuration, not impossible to express on the atelet and ateom APIs.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

--egress-gateway-address defaulted to empty, and empty meant ateapi sent no
EgressGateway to atelet. An actor started that way installs no nftables
redirect and leaves on the masquerade path, so it never reaches the PEP and
its EgressPolicy is silently unenforced. A cluster could land there by
omitting one flag, with nothing in the logs to say policy had stopped
applying.

Refuse to start when the flag is empty. Every in-tree deployment already sets
it, so this only closes the misconfiguration.

The downstream handling of an absent gateway is left in place: this makes the
untunneled path unreachable by configuration, not impossible to express on the
atelet and ateom APIs.
@haiyanmeng
haiyanmeng marked this pull request as draft September 17, 2026 20:31
@haiyanmeng
haiyanmeng marked this pull request as ready for review September 17, 2026 20:35
@bowei Bowei Du (bowei) added the kind/bug Something isn't working / bugfixes label Sep 17, 2026
Comment thread cmd/ateapi/main.go
postgresSchema = pflag.String("postgres-schema", "public", "PostgreSQL schema for Substrate tables. This overrides a search_path connection parameter.")

actorIDJWTPoolFile = pflag.String("actor-id-jwt-pool", "", "The file that contains the serialized JWT authority pool for signing actor JWTs")
egressGatewayAddress = pflag.String("egress-gateway-address", "", "Address of the egress PEP. Empty disables tunneled egress.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1689 would have it say empty means there's no egress support, so you have ingress only. That seems reasonable for some use cases.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long term, we plan to support per-Actor egress gateway configuration #1591.

@bowei

Copy link
Copy Markdown
Collaborator

We cross references this with the issue around the removal of this flag. I think this is a temporary thing and if we can't get to this before v1, we should prefix it with "experimental-" or something similar to mark it as headed for removal.

@haiyanmeng

Copy link
Copy Markdown
Collaborator Author

We cross references this with the issue around the removal of this flag. I think this is a temporary thing and if we can't get to this before v1, we should prefix it with "experimental-" or something similar to mark it as headed for removal.

In the long term, we plan to support per-Actor egress gateway configuration #1591.

If #1591 cannot be done for the GA timeline, we definitely should prefix it with "experimental-" or something similar to mark it as headed for removal.

@haiyanmeng

Copy link
Copy Markdown
Collaborator Author

Bowei Du (@bowei) , it may still be valuable to have this PR merged considering it may take time to get #1591 done.

Let me know if you prefer converting this to a draft or closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/network kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants