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

Synapse LLC for AccessControl #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;

namespace Azure.Analytics.Synapse.AccessControl
{
public class SynapsePermission
{
public SynapsePermission(IList<string> actions, IList<string> notActions, IList<string> dataActions, IList<string> notDataActions)
{
Actions = actions;
NotActions = notActions;
DataActions = dataActions;
NotDataActions = notDataActions;
}

public IList<string> Actions { get; }

public IList<string> NotActions { get; }
// TODO: change the below type from 'string' to 'SynapseDataAction', populate the list of actions
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for including these comments! Would you mind adding to them that the reason is to be consistent with the ARM and KeyVault RBAC APIs, just so that doesn't get forgotten?

public IList<string> DataActions { get; }

public IList<string> NotDataActions { get; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;

namespace Azure.Analytics.Synapse.AccessControl
{
public class SynapseRoleDefinition
{
public SynapseRoleDefinition(string id, string name,string description, IList<SynapsePermission> permissions, IList<SynapseRoleScope> assignableScopes)
{
Id = id;
Name = name;
Description = description;
Permissions = permissions;
AssignableScopes = assignableScopes;
}

public string Id { get; }

public string Name { get; }

public string Description { get; set; }

public IList<SynapsePermission> Permissions { get; }

public IList<SynapseRoleScope> AssignableScopes { get; }

// TODO: solve the missing properties
//public SynapseRoleDefinitionType? Type { get; }

//public string RoleName { get; set; }

//public SynapseRoleType? RoleType { get; set; }
}
}
Loading