-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Initial AccessControlClient for Azure.Security.KeyVault.Administration #12480
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
Changes from all commits
69d36df
5126cff
9ba2844
6cac612
1bc5150
fe08263
e64d134
d4c10d1
dcab74f
80ef6a6
28554ed
6a47d73
4a29e4a
e94d7d2
6e728fa
1afc104
f228550
036c3c6
31c4551
01ae609
914473e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Release History | ||
|
|
||
| ## 4.1.0-preview.1 (Unreleased) | ||
|
|
||
| ### Added | ||
|
|
||
| - Add `KeyVaultAccessControlClient`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| namespace Azure.Security.KeyVault.Administration | ||
| { | ||
| public partial class KeyVaultAccessControlClient | ||
| { | ||
| protected KeyVaultAccessControlClient() { } | ||
| public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential) { } | ||
| public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions options) { } | ||
| public virtual System.Uri VaultUri { get { throw null; } } | ||
| public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> CreateRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
|
christothes marked this conversation as resolved.
|
||
| public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> DeleteRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
|
christothes marked this conversation as resolved.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd also put the id first, which is more common. |
||
| public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.Pageable<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignments(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.AsyncPageable<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.Pageable<Azure.Security.KeyVault.Administration.Models.RoleDefinition> GetRoleDefinitions(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| public virtual Azure.AsyncPageable<Azure.Security.KeyVault.Administration.Models.RoleDefinition> GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
| } | ||
| public partial class KeyVaultAccessControlClientOptions : Azure.Core.ClientOptions | ||
| { | ||
| public KeyVaultAccessControlClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion.V7_2_Preview) { } | ||
| public Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion Version { get { throw null; } } | ||
| public enum ServiceVersion | ||
| { | ||
| V7_2_Preview = 1, | ||
| } | ||
| } | ||
| [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
| public readonly partial struct RoleAssignmentScope : System.IEquatable<Azure.Security.KeyVault.Administration.RoleAssignmentScope> | ||
| { | ||
| private readonly object _dummy; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea why this show up here - it was generated by |
||
| private readonly int _dummyPrimitive; | ||
| public RoleAssignmentScope(string value) { throw null; } | ||
| public RoleAssignmentScope(System.Uri ResourceId) { throw null; } | ||
| public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Global { get { throw null; } } | ||
| public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Keys { get { throw null; } } | ||
| public bool Equals(Azure.Security.KeyVault.Administration.RoleAssignmentScope other) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override int GetHashCode() { throw null; } | ||
| public static bool operator ==(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } | ||
| public static implicit operator Azure.Security.KeyVault.Administration.RoleAssignmentScope (string value) { throw null; } | ||
| public static bool operator !=(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } | ||
| public override string ToString() { throw null; } | ||
| } | ||
| } | ||
| namespace Azure.Security.KeyVault.Administration.Models | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think there's enough models here to warrant putting them in a sub-namespace of "Models", but you should ask @KrzysztofCwalina or @tg-msft. |
||
| { | ||
| public static partial class KeyVaultModelFactory | ||
| { | ||
| public static Azure.Security.KeyVault.Administration.Models.RoleAssignment RoleAssignment(string id, string name, string type, Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope properties) { throw null; } | ||
| public static Azure.Security.KeyVault.Administration.Models.RoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IReadOnlyList<Azure.Security.KeyVault.Administration.Models.KeyVaultPermission> permissions, System.Collections.Generic.IReadOnlyList<string> assignableScopes) { throw null; } | ||
| } | ||
| public partial class KeyVaultPermission | ||
| { | ||
| internal KeyVaultPermission() { } | ||
| public System.Collections.Generic.IReadOnlyList<string> Actions { get { throw null; } } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are devs supposed to set permissions if they can't change these collections?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are the collections returned from RoleDefintions, which are immutable,, as I understand it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed with the service team, there is not yet a set permissions capability in the API.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, once there is an update operation in the swagger that takes one of these models, it should be generated as mutable.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making them mutable later would be a breaking change. If we're doing to generalize this, I think this should be |
||
| public System.Collections.Generic.IReadOnlyList<string> DataActions { get { throw null; } } | ||
| public System.Collections.Generic.IReadOnlyList<string> NotActions { get { throw null; } } | ||
| public System.Collections.Generic.IReadOnlyList<string> NotDataActions { get { throw null; } } | ||
| } | ||
| public partial class RoleAssignment | ||
|
christothes marked this conversation as resolved.
|
||
| { | ||
| internal RoleAssignment() { } | ||
| public string Id { get { throw null; } } | ||
| public string Name { get { throw null; } } | ||
| public Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope Properties { get { throw null; } } | ||
| public string Type { get { throw null; } } | ||
| } | ||
| public partial class RoleAssignmentProperties | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we combine these and make them easier to construct? If
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tracking this in #12613 |
||
| { | ||
| public RoleAssignmentProperties(string roleDefinitionId, string principalId) { } | ||
| public string PrincipalId { get { throw null; } } | ||
| public string RoleDefinitionId { get { throw null; } } | ||
| } | ||
| public partial class RoleAssignmentPropertiesWithScope | ||
| { | ||
| internal RoleAssignmentPropertiesWithScope() { } | ||
| public string PrincipalId { get { throw null; } } | ||
| public string RoleDefinitionId { get { throw null; } } | ||
| public string Scope { get { throw null; } } | ||
| } | ||
| public partial class RoleDefinition | ||
| { | ||
| internal RoleDefinition() { } | ||
| public System.Collections.Generic.IReadOnlyList<string> AssignableScopes { get { throw null; } } | ||
|
christothes marked this conversation as resolved.
|
||
| public string Description { get { throw null; } } | ||
| public string Id { get { throw null; } } | ||
| public string Name { get { throw null; } } | ||
| public System.Collections.Generic.IReadOnlyList<Azure.Security.KeyVault.Administration.Models.KeyVaultPermission> Permissions { get { throw null; } } | ||
| public string RoleName { get { throw null; } } | ||
| public string RoleType { get { throw null; } } | ||
| public string Type { get { throw null; } } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Azure KeyVault Administration client library for .NET | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ## Getting started | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ### Install the package | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ### Authenticate the client | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ## Key concepts | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ## Examples | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| Content forthcoming | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just as an FYI: this section and "Next Steps" are pretty boilerplate by design. See the existing Key Vault sections for examples. |
||
|
|
||
| ## Next steps | ||
|
|
||
| Content forthcoming | ||
|
|
||
| ## Contributing | ||
|
|
||
| This project welcomes contributions and suggestions. Most contributions require | ||
| you to agree to a Contributor License Agreement (CLA) declaring that you have | ||
| the right to, and actually do, grant us the rights to use your contribution. For | ||
| details, visit [cla.microsoft.com][cla]. | ||
|
|
||
| This project has adopted the [Microsoft Open Source Code of Conduct][coc]. | ||
| For more information see the [Code of Conduct FAQ][coc_faq] | ||
| or contact [opencode@microsoft.com][coc_contact] with any | ||
| additional questions or comments. | ||
|
|
||
| <!-- LINKS --> | ||
|
|
||
|  | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <Description>This is the Microsoft Azure Key Vault Administration client library</Description> | ||
| <AssemblyTitle>Microsoft Azure.Security.KeyVault.Administration client library</AssemblyTitle> | ||
| <Version>4.1.0-preview.1</Version> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to start the version here? Is that to align with the other keyvault libraries?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, to align with other Key Vault packages. |
||
| <PackageTags>Microsoft Azure Key Vault Administration;$(PackageCommonTags)</PackageTags> | ||
| <TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
| <EnableApiCompat>false</EnableApiCompat> | ||
| <NoWarn>$(NoWarn);3021;CA1812</NoWarn> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="System.Text.Json" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <!-- Include just the few items we need from Azure.Security.KeyVault.Shared --> | ||
| <Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\ChallengeBasedAuthenticationPolicy.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\ClientOptionsExtensions.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\IJsonSerializable.cs" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Compile Include="$(AzureCoreSharedSources)NoBodyResponse{T}.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)ForwardsClientCallsAttribute.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Compile Include="$(AzureCoreSharedSources)Argument.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)ArrayBufferWriter.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)AzureKeyCredentialPolicy.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)ClientDiagnostics.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)ContentTypeUtilities.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)DiagnosticScopeFactory.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)HashCodeBuilder.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)HttpMessageSanitizer.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)OperationHelpers.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| <Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(MSBuildThisFileDirectory)..\..\..\core\Azure.Core\src\Azure.Core.props" /> | ||
| </Project> | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.