Skip to content

Conversation

@everpcpc
Copy link
Member

@everpcpc everpcpc commented Oct 22, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Add more fields to response of /v1/verify

❯ curl -X POST -uroot: localhost:8000/v1/verify 2>/dev/null | jq
{
  "tenant": "test_tenant",
  "user": "root",
  "auth_type": "no_password",
  "is_configured": true,
  "default_role": "account_admin",
  "roles": [
    "account_admin",
    "public"
  ]
}

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Oct 22, 2025
@everpcpc everpcpc marked this pull request as ready for review October 22, 2025 12:19
@everpcpc everpcpc requested a review from Copilot October 23, 2025 10:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the /v1/verify endpoint by adding authentication and role information to the response. The endpoint now returns comprehensive user details including authentication type, configuration status, and default role.

Key changes:

  • Added three new fields to the VerifyResponse struct: auth_type, is_configured, and default_role
  • Modified the handler to populate these fields by querying user configuration and extracting authentication details

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@everpcpc everpcpc requested a review from BohuTANG October 23, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant