You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make PgAdmin, RedisCommander, and MyPhpAdmin usable for remote resources #2116
area-integrationsIssues pertaining to Aspire Integrations packagespostgresIssues related to Postgres integrationsredisIssues related to redis integrations
Today these resources hardcode the endpoint information on the host (assuming host.docker.internal). We need to make these work for azure resources as well.
We don't have a resource to hang the WithPgAdmin call off so we'd probably be looking to do what we had discussed previously and promote PgAdmin to its own resource with something like:
But remotePgDb is of type IResourceBuilder<IResourceWithConnectionString> so that could be somewhat confusing. Also, in this case we would need to introduce a kind of LinkAnnotation so that the lifecycle hook that generates the config for PgAdmin knows which of the possible many IResourceWithConnectionString instances it should treat as a postgres server.
Yes. In preview 4 this change centralized the hard coding (instead of hardcoding it in n places). In preview 5, the change will be to detect the container runtime so that it's available in a less hardcoded way. I think given the changes we've made to modeling endpoints, we should be able to fix it by expressing the endpoint reference in an expression and have the runtime replace it with the right value
In the case of Redis you could probably subscribe to the ConnectionStringAvailableEvent (using builder.Eventing.Subscribe... and then overwrite the REDIS_HOSTS variable. This is something we'll try to get working in a built in way.
There are a few concerns that we need to consider such as do we really want to be persisting a credential to a cloud hosted Postgres server in a config file that is written to a temp directory.
That isn't such an issue for randomly generated passwords that are just used for development purposes but when we are talking about Azure hosted resources we should probably be a bit more circumspect.
PgWeb also stores the password in a toml file. I don't recall seeing anything that says the admin UI is never published with other resources. AFAIK, connections are opened on the client so connection infos has to be passed via the network which mean passwords are sent via the network.
In any case, I don't see a proper solution for this. Imagining symmetric hashing which imply storing the keys that also need to be sent with the client app...
area-integrationsIssues pertaining to Aspire Integrations packagespostgresIssues related to Postgres integrationsredisIssues related to redis integrations
Activity
mitchdenny commentedon Feb 11, 2024
What would you envisage the API being like?
We don't have a resource to hang the WithPgAdmin call off so we'd probably be looking to do what we had discussed previously and promote PgAdmin to its own resource with something like:
We would take advantage of a more specific WithReference implementation. An alternative could be something like this:
But
remotePgDbis of typeIResourceBuilder<IResourceWithConnectionString>so that could be somewhat confusing. Also, in this case we would need to introduce a kind ofLinkAnnotationso that the lifecycle hook that generates the config for PgAdmin knows which of the possible many IResourceWithConnectionString instances it should treat as a postgres server.mitchdenny commentedon Feb 11, 2024
Putting on the backlog for now but may bring forward into P4/P5 depending on where this conversation goes.
DamianEdwards commentedon Mar 9, 2024
Bringing into preview.5 to fix the hard-coded use of
host.docker.internaldavidfowl commentedon Mar 9, 2024
That's already tracked #2639
DamianEdwards commentedon Mar 9, 2024
So that tracks updating places in
Aspire.Hostingand friends that still hardcode it?davidfowl commentedon Mar 9, 2024
Yes. In preview 4 this change centralized the hard coding (instead of hardcoding it in n places). In preview 5, the change will be to detect the container runtime so that it's available in a less hardcoded way. I think given the changes we've made to modeling endpoints, we should be able to fix it by expressing the endpoint reference in an expression and have the runtime replace it with the right value
davidfowl commentedon Sep 7, 2024
This will be possible with enhancements Mitch Denny (@mitchdenny) is making to the app model.
Alirexaa commentedon Sep 7, 2024
Could you please mention related PR/PRs?
I could take this and work around it.
mitchdenny commentedon Sep 8, 2024
In the case of Redis you could probably subscribe to the
ConnectionStringAvailableEvent(usingbuilder.Eventing.Subscribe...and then overwrite theREDIS_HOSTSvariable. This is something we'll try to get working in a built in way.There are a few concerns that we need to consider such as do we really want to be persisting a credential to a cloud hosted Postgres server in a config file that is written to a temp directory.
That isn't such an issue for randomly generated passwords that are just used for development purposes but when we are talking about Azure hosted resources we should probably be a bit more circumspect.
davidfowl commentedon Sep 8, 2024
Well in the case when the db is remote, but pgadmin is local it should just work
Odonno commentedon Sep 28, 2024
PgWeb also stores the password in a toml file. I don't recall seeing anything that says the admin UI is never published with other resources. AFAIK, connections are opened on the client so connection infos has to be passed via the network which mean passwords are sent via the network.
In any case, I don't see a proper solution for this. Imagining symmetric hashing which imply storing the keys that also need to be sent with the client app...
I am just curious to know your thoughts on this.
Odonno commentedon Oct 30, 2024
Any response on this?