Skip to content

Conversation

@zeroshade
Copy link
Member

@zeroshade zeroshade commented Nov 23, 2025

Implements dbc auth login and dbc auth logout and enables the makereq function to utilize any available credentials if the index matches a credential.

Does not yet implement any utilization of encryption or using OS credential stores.

Currently only implements Oauth2 Device Flow and api-key implementation (expecting a /login endpoint for api-key to get a token)

@eitsupi
Copy link
Member

eitsupi commented Nov 25, 2025

I played around with it a bit.
I found a few things that might be bugs:

  1. dbc auth cause panic.
  2. dbc auth login -> ctrl + c shows Authentication successful!

@zeroshade
Copy link
Member Author

Thanks for taking a look @eitsupi i'll poke at those

Copy link
Member

@amoeba amoeba left a comment

Choose a reason for hiding this comment

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

This works really well, thanks for this @zeroshade. I left some comments and suggestions and have some other notes.

  1. The user agent on the auth requests is a generic UA. Do we want to use a dbc specific UA string?
  2. When I run dbc auth login when already logged in, I get a non-zero exit status code. I get a 0 when I log in the first time.

These are some Auth0 setup notes:

  1. The Auth0 screen says "Log in to columnar". Can it be Columnar?

  2. When I break the oauth flow on purpose, I get an error screen with two issues: Broken logo and lowercase Columnar
    Image

  3. My password manager picks up the wrong name for the login, regardless of whether I log in through a Columnar account or a Google account. "Us" which I assume comes from the auth0 subdomain .us.auth0. I'm happy to track down why this is for you.

    Image
  4. When I finish logging in, I see a page with an incomplete title:

    Image

# macos-13 is intel macos while macos-latest is arm64
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest', 'macos-13' ]
# macos-15 is intel macos while macos-latest is arm64
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest', 'macos-15' ]
Copy link
Member

Choose a reason for hiding this comment

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

How would you feel if I asked you to kick this change out of this PR so we can put it in the releasenotes as a standalone item?

@zeroshade
Copy link
Member Author

@amoeba I've addressed your comments and updated the PR.

The user agent on the auth requests is a generic UA. Do we want to use a dbc specific UA string?

I've updated the user-agent for all the requests to use the dbc user-agent.

When I run dbc auth login when already logged in, I get a non-zero exit status code. I get a 0 when I log in the first time.

Fixed this!

The Auth0 screen says "Log in to columnar". Can it be Columnar?

I think I've fixed this, at worst we might need to create a new tenant instead since Auth0 doesn't allow changing the tenant name.

When I break the oauth flow on purpose, I get an error screen with two issues: Broken logo and lowercase Columnar

How did you break it? This seems like it might be an auth0 error we should file since I've updated the configs to use the logo properly etc.

My password manager picks up the wrong name for the login, regardless of whether I log in through a Columnar account or a Google account. "Us" which I assume comes from the auth0 subdomain .us.auth0. I'm happy to track down why this is for you.

I've updated our config to use a custom domain via auth.columnar.tech, let's see if that fixes that.

Please take another look and review! thanks!

@amoeba
Copy link
Member

amoeba commented Nov 26, 2025

Re-tested my above things and the main things are fixed. Thanks @zeroshade.

I notice that the device confirmation screen now says, "Please confirm this is the code displayed on your dbc Private Registry:". Could that just be "Please confirm this is the code displayed by dbc:"?

And, I think we could tweak the output just a bit. The way we have this set up, the user never needs to know the copy code because we don't do the same kind of thing, say, GitHub or Apple do where they make you enter the copy yourself.

Right now we show:

$ dbc auth login
Copy code: XXXX-XXXX
To authenticate, visit: https://auth.columnar.tech/activate?user_code=XXXX-XXXX
⠋

but it could be even simpler unless you think it's unwise:

$ dbc auth login
Opening https://auth.columnar.tech/activate?user_code=XXXX-XXXX in your default web browser...
⠋ Waiting for confirmation...

@zeroshade
Copy link
Member Author

@amoeba made both changes and updated!

@amoeba
Copy link
Member

amoeba commented Dec 2, 2025

Thanks @zeroshade. I think that we may tweak some parts of this as we continue to discuss but I think we could merge this since it works well.

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

Successfully merging this pull request may close these issues.

5 participants