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

[BUG] - SqlDatabaseResource entity has NULL value for FederatedClientId in case of CMK scenario #48433

Open
icipriand opened this issue Feb 25, 2025 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that SQL

Comments

@icipriand
Copy link

Library name and version

Azure.ResourceManager.Sql 1.2.1

Describe the bug

Not sure if wrong expectation from our side or just a bug. But we are trying to evaluate if a database has CMK enabled or not.
According to the field description, we thought the below will be the best field to asses this.
///

The Client id used for cross tenant per database CMK scenario.
[WirePath("properties.federatedClientId")]
public Guid? FederatedClientId { get; set; }

If that is not the case, will be nice if you can let us know what is the best way to fetch this data (identify a DB is CMK or MMK)?

.GetSqlDatabases()/GetSqlDatabase() functions return SqlDatabaseResource entity with NULL value for FederatedClientId even if CMK is enabled on the database.

Missing property value for: FederatedClientId

Expected behavior

Functions return correct/expected values for property for this field when CMK is enabled on the database

Actual behavior

Null values FederatedClientId.

Reproduction Steps

Just run below on a database that has CMK enabled.
var database= server.GetSqlDatabase(databaseName);

Environment

Prod and non-prod

Library name and version
Azure.ResourceManager.Sql 1.2.1

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 25, 2025
@jsquire jsquire added SQL Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Feb 25, 2025
@jsquire
Copy link
Member

jsquire commented Feb 25, 2025

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@mcgallan mcgallan assigned mcgallan and unassigned ArthurMa1978 Feb 28, 2025
@mcgallan
Copy link
Member

mcgallan commented Mar 4, 2025

@icipriand Thank you for your inquiry. Regarding the issue you mentioned, I recommend using the SqlServerKeyType field in the EncryptionProtectorData to verify whether your database is using a Customer-Managed Key. If the value is ServiceManaged, it indicates that the database is using a Microsoft Managed Key; if it is AzureKeyVault, it signifies the use of a CMK.

I hope this information is helpful. Should you have any further questions or require additional assistance, please don't hesitate to let me know.

@mcgallan mcgallan added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Mar 4, 2025
Copy link

github-actions bot commented Mar 4, 2025

Hi @icipriand. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that SQL
Projects
None yet
Development

No branches or pull requests

4 participants