Topic on Project:Support desk

Azure Postgres support

11
Acksyn (talkcontribs)

I've been tasked to migrate a MediaWiki (1.30.0) setup, from a self-hosted Postgres database to some service offered by Azure.

In practice, the main changes from most Postgres services are that:

- we would need to login using an username that includes a domain part (eg: myuser@mypostgresdomain), and have installer working with such database username

- we would need to enable postgres' SSL option, and have installer allow for switching it on

As of right now, I managed to get it working, although my patch isn't PR material, my customer won't leave me more time on that matter/fixed as far as he's concerned, ...

https://gist.github.com/faust64/c5f8e73aefe442d100f229fa4f62c9ae

Still going through How to contribute, although I'm not interested in becoming a contributor, ...

Is there anyone that could take over?

Thanks!

MarkAHershberger (talkcontribs)

Thanks for the patch! It would be awesome to get you to become a contributor....

Is there a reason to use the envvar PGSSL instead of setting $wgDBssl? That seems like a local modification and not something that should be incorrporated.

Acksyn (talkcontribs)

AFAIU, the wgDBssl can't be toggled from installer, or I didn't see an option that would allow me to do so. Adding an env vars was a quick way to do it, but definitely not the best.

MarkAHershberger (talkcontribs)

Hmm... and the manual says

CREATE USER is now an alias for CREATE ROLE. The only difference is that when the command is spelled CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE.
Acksyn (talkcontribs)

From what I've seen, although Azure provides us with a username formatted such as `username@domain`, postgres roles listing doesn't mention that domain part - looks like it's only used during login.

MarkAHershberger (talkcontribs)

I'm tried setting up an Azure PostgreSQL account yesterday and didn't get a username with an @. Which PG service did you use?

Acksyn (talkcontribs)
Bawolff (talkcontribs)

Maybe its using something like kerberos?

Acksyn (talkcontribs)

Unclear, could be. Being Microsoft, AD integration's probably not far away.

.

Bawolff (talkcontribs)

Cool. Thanks for the patch.

To get it merged into mediawiki we would probably have to:

  • Drop the environment variable. If it needs to be triggered from installer, installer should add a checkbox
  • We'd need a link to the docs explaining exactly what the @ sign means to postgres. Given its stripped out in most places, maybe it should be set in a different variable instead of the username or something.

(Also ping User:Anomie as someone familiar with postgres)

Vid (talkcontribs)

Hello, is there any solution for 2023? We are in a similar situation, where we want to use Postgresq in for Mediawiki in a secure Azure environment. Thanks!

Reply to "Azure Postgres support"