dsnparse icon indicating copy to clipboard operation
dsnparse copied to clipboard

DSN variations

Open Jaymon opened this issue 1 year ago • 0 comments

Morp requires the @ at the end of an SQS dsn:

sqs://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@

I'd love to see if there was a way to avoid having to add the @. So something like this would be valid:

sqs://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}

I know why I never made something like this work, because username:password looks a lot like host:port when parsing. But I'm wondering if I could enable something like this.

Likewise, I wanted to do something like this:

sqs://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@${AWS_ROLE_ARN}

But the arn has a format like:

arn:aws:iam::<USER-ID>:role/<ROLENAME>

And that has similar characteristics to host:port also.

I was thinking this could be enabled by expectation flags, so you could do something like:

expect_user=False, expect_host=False

That can tell the parser what to expect.

Likewise, it would be nice to make it easier to customize the parsing.

Jaymon avatar Mar 03 '23 20:03 Jaymon