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

Quick Start Guide, External Credentials Example. May be incorrect. #607

Open
zleonid1 opened this issue Dec 17, 2023 · 1 comment
Open

Comments

@zleonid1
Copy link

Refering to this example: https://aio-pika.readthedocs.io/en/latest/quick-start.html#external-credentials-example

It fails in https://github.com/mosquito/aiormq/blob/master/aiormq/connection.py#L400-L411
specifically the self.url.query.get("auth", "plain") line.
as the auth param appears to be missing running the code from the example.
It can be set manually via client_properties however

    connection = await aio_pika.connect_robust(
        host="127.0.0.1",
        login="",
        ssl=True,
        ssl_options=SSLOptions(
            cafile="cacert.pem",
            certfile="cert.pem",
            keyfile="key.pem",
            no_verify_ssl=ssl.CERT_REQUIRED,
        ),
        client_properties={
            "connection_name": "aio-pika external credentials",
            "auth": "EXTERNAL"
        },
    )
@KrazyMax
Copy link

Thanks, I tried way too hard to make it work, but adding "auth": "EXTERNAL" was it! It's not even necessary then to specify login="". The example could be updated!

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

2 participants