Class: SDM::Client
- Inherits:
-
Object
- Object
- SDM::Client
- Defined in:
- lib/strongdm.rb
Overview
Client bundles all the services together and initializes them.
Instance Attribute Summary collapse
-
#access_request_events_history ⇒ Object
readonly
AccessRequestEventsHistory provides records of all changes to the state of an AccessRequest.
-
#access_requests ⇒ Object
readonly
AccessRequests are requests for access to a resource that may match a Workflow.
-
#access_requests_history ⇒ Object
readonly
AccessRequestsHistory provides records of all changes to the state of an AccessRequest.
-
#account_attachments ⇒ Object
readonly
AccountAttachments assign an account to a role.
-
#account_attachments_history ⇒ Object
readonly
AccountAttachmentsHistory records all changes to the state of an AccountAttachment.
-
#account_grants ⇒ Object
readonly
AccountGrants assign a resource directly to an account, giving the account the permission to connect to that resource.
-
#account_grants_history ⇒ Object
readonly
AccountGrantsHistory records all changes to the state of an AccountGrant.
-
#account_permissions ⇒ Object
readonly
AccountPermissions records the granular permissions accounts have, allowing them to execute relevant commands via StrongDM's APIs.
-
#account_resources ⇒ Object
readonly
AccountResources enumerates the resources to which accounts have access.
-
#account_resources_history ⇒ Object
readonly
AccountResourcesHistory records all changes to the state of a AccountResource.
-
#accounts ⇒ Object
readonly
Accounts are users that have access to strongDM.
-
#accounts_groups ⇒ Object
readonly
An AccountGroup links an account and a group.
-
#accounts_groups_history ⇒ Object
readonly
AccountsGroupsHistory records all changes to the state of an AccountGroup.
-
#accounts_history ⇒ Object
readonly
AccountsHistory records all changes to the state of an Account.
-
#activities ⇒ Object
readonly
An Activity is a record of an action taken against a strongDM deployment, e.g.
-
#api_access_key ⇒ Object
readonly
API authentication token (read-only).
-
#approval_workflow_approvers ⇒ Object
readonly
ApprovalWorkflowApprovers link approval workflow approvers to an ApprovalWorkflowStep.
-
#approval_workflow_approvers_history ⇒ Object
readonly
ApprovalWorkflowApproversHistory records all changes to the state of an ApprovalWorkflowApprover.
-
#approval_workflow_steps ⇒ Object
readonly
ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow.
-
#approval_workflow_steps_history ⇒ Object
readonly
ApprovalWorkflowStepsHistory records all changes to the state of an ApprovalWorkflowStep.
-
#approval_workflows ⇒ Object
readonly
ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized approvers and be approved or denied.
-
#approval_workflows_history ⇒ Object
readonly
ApprovalWorkflowsHistory records all changes to the state of an ApprovalWorkflow.
-
#base_retry_delay ⇒ Object
readonly
Returns the value of attribute base_retry_delay.
-
#control_panel ⇒ Object
readonly
ControlPanel contains all administrative controls.
-
#discovery_connectors ⇒ Object
readonly
A Discovery Connector is a configuration object for performing Resource Scans in remote systems such as AWS, GCP, Azure, and other systems.
-
#granted_account_entitlements ⇒ Object
readonly
GrantedAccountEntitlements enumerates the resources to which an account has been granted access.
-
#granted_resource_entitlements ⇒ Object
readonly
GrantedResourceEntitlements enumerates the accounts that have been granted access to a given resource.
-
#granted_role_entitlements ⇒ Object
readonly
GrantedRoleEntitlements enumerates the resources to which a role grants access.
-
#groups ⇒ Object
readonly
A Group is a set of principals.
-
#groups_history ⇒ Object
readonly
GroupsHistory records all changes to the state of a Group.
-
#groups_roles ⇒ Object
readonly
A GroupRole is an assignment of a Group to a Role.
-
#groups_roles_history ⇒ Object
readonly
GroupsRolesHistory records all changes to the state of a GroupRole.
-
#health_checks ⇒ Object
readonly
HealthChecks lists the last healthcheck between each node and resource.
-
#identity_aliases ⇒ Object
readonly
IdentityAliases assign an alias to an account within an IdentitySet.
-
#identity_aliases_history ⇒ Object
readonly
IdentityAliasesHistory records all changes to the state of a IdentityAlias.
-
#identity_sets ⇒ Object
readonly
A IdentitySet is a named grouping of Identity Aliases for Accounts.
-
#identity_sets_history ⇒ Object
readonly
IdentitySetsHistory records all changes to the state of a IdentitySet.
-
#interceptor ⇒ Object
readonly
Method interceptor for request/response hooks (read-only).
-
#managed_secrets ⇒ Object
readonly
ManagedSecret is a private vertical for creating, reading, updating, deleting, listing and rotating the managed secrets in the secrets engines as an authenticated user.
-
#max_retry_delay ⇒ Object
readonly
Returns the value of attribute max_retry_delay.
-
#nodes ⇒ Object
readonly
Nodes make up the StrongDM network, and allow your users to connect securely to your resources.
-
#nodes_history ⇒ Object
readonly
NodesHistory records all changes to the state of a Node.
-
#organization_history ⇒ Object
readonly
OrganizationHistory records all changes to the state of an Organization.
-
#page_limit ⇒ Object
Returns the value of attribute page_limit.
-
#peering_group_nodes ⇒ Object
readonly
PeeringGroupNodes provides the building blocks necessary to obtain attach a node to a peering group.
-
#peering_group_peers ⇒ Object
readonly
PeeringGroupPeers provides the building blocks necessary to link two peering groups.
-
#peering_group_resources ⇒ Object
readonly
PeeringGroupResources provides the building blocks necessary to obtain attach a resource to a peering group.
-
#peering_groups ⇒ Object
readonly
PeeringGroups provides the building blocks necessary to obtain explicit network topology and routing.
-
#policies ⇒ Object
readonly
Policies are the collection of one or more statements that enforce fine-grained access control for the users of an organization.
-
#policies_history ⇒ Object
readonly
PoliciesHistory records all changes to the state of a Policy.
-
#proxy_cluster_keys ⇒ Object
readonly
Proxy Cluster Keys are authentication keys for all proxies within a cluster.
-
#queries ⇒ Object
readonly
A Query is a record of a single client request to a resource, such as a SQL query.
-
#remote_identities ⇒ Object
readonly
RemoteIdentities assign a resource directly to an account, giving the account the permission to connect to that resource.
-
#remote_identities_history ⇒ Object
readonly
RemoteIdentitiesHistory records all changes to the state of a RemoteIdentity.
-
#remote_identity_groups ⇒ Object
readonly
A RemoteIdentityGroup is a named grouping of Remote Identities for Accounts.
-
#remote_identity_groups_history ⇒ Object
readonly
RemoteIdentityGroupsHistory records all changes to the state of a RemoteIdentityGroup.
-
#replays ⇒ Object
readonly
A Replay captures the data transferred over a long-running SSH, RDP, or Kubernetes interactive session (otherwise referred to as a query).
-
#requestable_account_entitlements ⇒ Object
readonly
RequestableAccountEntitlements enumerates the resources that an account is permitted to request access to.
-
#requestable_resource_entitlements ⇒ Object
readonly
RequestableResourceEntitlements enumerates the accounts that are permitted to request access to a given resource.
-
#requestable_role_entitlements ⇒ Object
readonly
RequestableRoleEntitlements enumerates the resources that a role permits its members to request access to.
-
#resources ⇒ Object
readonly
Resources are databases, servers, clusters, websites, or clouds that strongDM delegates access to.
-
#resources_history ⇒ Object
readonly
ResourcesHistory records all changes to the state of a Resource.
-
#role_resources ⇒ Object
readonly
RoleResources enumerates the resources to which roles have access.
-
#role_resources_history ⇒ Object
readonly
RoleResourcesHistory records all changes to the state of a RoleResource.
-
#roles ⇒ Object
readonly
A Role has a list of access rules which determine which Resources the members of the Role have access to.
-
#roles_history ⇒ Object
readonly
RolesHistory records all changes to the state of a Role.
-
#secret_engines ⇒ Object
readonly
See SecretEngines.
-
#secret_store_healths ⇒ Object
readonly
SecretStoreHealths exposes health states for secret stores.
-
#secret_stores ⇒ Object
readonly
SecretStores are servers where resource secrets (passwords, keys) are stored.
-
#secret_stores_history ⇒ Object
readonly
SecretStoresHistory records all changes to the state of a SecretStore.
-
#snapshot_time ⇒ Object
readonly
Optional timestamp at which to provide historical data.
-
#workflow_approvers ⇒ Object
readonly
WorkflowApprovers is an account or a role with the ability to approve requests bound to a workflow.
-
#workflow_approvers_history ⇒ Object
readonly
WorkflowApproversHistory provides records of all changes to the state of a WorkflowApprover.
-
#workflow_roles ⇒ Object
readonly
WorkflowRole links a role to a workflow.
-
#workflow_roles_history ⇒ Object
readonly
WorkflowRolesHistory provides records of all changes to the state of a WorkflowRole.
-
#workflows ⇒ Object
readonly
Workflows are the collection of rules that define the resources to which access can be requested, the users that can request that access, and the mechanism for approving those requests which can either be automatic approval or a set of users authorized to approve the requests.
-
#workflows_history ⇒ Object
readonly
WorkflowsHistory provides records of all changes to the state of a Workflow.
Instance Method Summary collapse
-
#close ⇒ Object
Closes this client and releases all resources held by it.
-
#initialize(api_access_key, api_secret_key, host: "app.strongdm.com:443", insecure: false, retry_rate_limit_errors: true, page_limit: 0) ⇒ Client
constructor
Creates a new strongDM API client.
- #max_retries ⇒ Object deprecated Deprecated.
- #sign(method_name, msg_bytes) ⇒ Object
-
#snapshot_at(snapshot_time) ⇒ Object
Constructs a read-only client that will provide historical data from the provided timestamp.
Constructor Details
#initialize(api_access_key, api_secret_key, host: "app.strongdm.com:443", insecure: false, retry_rate_limit_errors: true, page_limit: 0) ⇒ Client
Creates a new strongDM API client.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/strongdm.rb', line 38 def initialize(api_access_key, api_secret_key, host: "app.strongdm.com:443", insecure: false, retry_rate_limit_errors: true, page_limit: 0) raise TypeError, "client access key must be a string" unless api_access_key.kind_of?(String) raise TypeError, "client secret key must be a string" unless api_secret_key.kind_of?(String) raise TypeError, "client host must be a string" unless host.kind_of?(String) @api_access_key = api_access_key.strip @api_secret_key = Base64.strict_decode64(api_secret_key.strip) @base_retry_delay = DEFAULT_BASE_RETRY_DELAY @max_retry_delay = DEFAULT_MAX_RETRY_DELAY @retry_factor = DEFAULT_RETRY_FACTOR @retry_jitter = DEFAULT_RETRY_JITTER @page_limit = page_limit @retry_rate_limit_errors = retry_rate_limit_errors @snapshot_time = nil # Initialize method interceptor for request/response hooks @interceptor = MethodInterceptor.new(self) @encryption_interceptor = SecretEncryptionInterceptor.new(self) @encryption_interceptor.setup(@interceptor) begin if insecure @channel = GRPC::Core::Channel.new(host, {}, :this_channel_is_insecure) else cred = GRPC::Core::ChannelCredentials.new() @channel = GRPC::Core::Channel.new(host, {}, cred) end rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @access_requests = AccessRequests.new(@channel, self) @access_request_events_history = AccessRequestEventsHistory.new(@channel, self) @access_requests_history = AccessRequestsHistory.new(@channel, self) @account_attachments = AccountAttachments.new(@channel, self) @account_attachments_history = AccountAttachmentsHistory.new(@channel, self) @account_grants = AccountGrants.new(@channel, self) @account_grants_history = AccountGrantsHistory.new(@channel, self) @account_permissions = AccountPermissions.new(@channel, self) @account_resources = AccountResources.new(@channel, self) @account_resources_history = AccountResourcesHistory.new(@channel, self) @accounts = Accounts.new(@channel, self) @accounts_groups = AccountsGroups.new(@channel, self) @accounts_groups_history = AccountsGroupsHistory.new(@channel, self) @accounts_history = AccountsHistory.new(@channel, self) @activities = Activities.new(@channel, self) @approval_workflow_approvers = ApprovalWorkflowApprovers.new(@channel, self) @approval_workflow_approvers_history = ApprovalWorkflowApproversHistory.new(@channel, self) @approval_workflow_steps = ApprovalWorkflowSteps.new(@channel, self) @approval_workflow_steps_history = ApprovalWorkflowStepsHistory.new(@channel, self) @approval_workflows = ApprovalWorkflows.new(@channel, self) @approval_workflows_history = ApprovalWorkflowsHistory.new(@channel, self) @control_panel = ControlPanel.new(@channel, self) @discovery_connectors = DiscoveryConnectors.new(@channel, self) @granted_account_entitlements = GrantedAccountEntitlements.new(@channel, self) @granted_resource_entitlements = GrantedResourceEntitlements.new(@channel, self) @granted_role_entitlements = GrantedRoleEntitlements.new(@channel, self) @roles = Roles.new(@channel, self) @groups = Groups.new(@channel, self) @groups_history = GroupsHistory.new(@channel, self) @groups_roles = GroupsRoles.new(@channel, self) @groups_roles_history = GroupsRolesHistory.new(@channel, self) @health_checks = HealthChecks.new(@channel, self) @identity_aliases = IdentityAliases.new(@channel, self) @identity_aliases_history = IdentityAliasesHistory.new(@channel, self) @identity_sets = IdentitySets.new(@channel, self) @identity_sets_history = IdentitySetsHistory.new(@channel, self) @managed_secrets = ManagedSecrets.new(@channel, self) @nodes = Nodes.new(@channel, self) @nodes_history = NodesHistory.new(@channel, self) @organization_history = OrganizationHistory.new(@channel, self) @peering_group_nodes = PeeringGroupNodes.new(@channel, self) @peering_group_peers = PeeringGroupPeers.new(@channel, self) @peering_group_resources = PeeringGroupResources.new(@channel, self) @peering_groups = PeeringGroups.new(@channel, self) @policies = Policies.new(@channel, self) @policies_history = PoliciesHistory.new(@channel, self) @proxy_cluster_keys = ProxyClusterKeys.new(@channel, self) @queries = Queries.new(@channel, self) @remote_identities = RemoteIdentities.new(@channel, self) @remote_identities_history = RemoteIdentitiesHistory.new(@channel, self) @remote_identity_groups = RemoteIdentityGroups.new(@channel, self) @remote_identity_groups_history = RemoteIdentityGroupsHistory.new(@channel, self) @replays = Replays.new(@channel, self) @requestable_account_entitlements = RequestableAccountEntitlements.new(@channel, self) @requestable_resource_entitlements = RequestableResourceEntitlements.new(@channel, self) @requestable_role_entitlements = RequestableRoleEntitlements.new(@channel, self) @resources = Resources.new(@channel, self) @resources_history = ResourcesHistory.new(@channel, self) @role_resources = RoleResources.new(@channel, self) @role_resources_history = RoleResourcesHistory.new(@channel, self) @roles_history = RolesHistory.new(@channel, self) @secret_stores = SecretStores.new(@channel, self) @secret_engines = SecretEngines.new(@channel, self) @secret_store_healths = SecretStoreHealths.new(@channel, self) @secret_stores_history = SecretStoresHistory.new(@channel, self) @workflow_approvers = WorkflowApprovers.new(@channel, self) @workflow_approvers_history = WorkflowApproversHistory.new(@channel, self) @workflow_roles = WorkflowRoles.new(@channel, self) @workflow_roles_history = WorkflowRolesHistory.new(@channel, self) @workflows = Workflows.new(@channel, self) @workflows_history = WorkflowsHistory.new(@channel, self) end |
Instance Attribute Details
#access_request_events_history ⇒ Object (readonly)
AccessRequestEventsHistory provides records of all changes to the state of an AccessRequest.
257 258 259 |
# File 'lib/strongdm.rb', line 257 def access_request_events_history @access_request_events_history end |
#access_requests ⇒ Object (readonly)
AccessRequests are requests for access to a resource that may match a Workflow.
See AccessRequests.
253 254 255 |
# File 'lib/strongdm.rb', line 253 def access_requests @access_requests end |
#access_requests_history ⇒ Object (readonly)
AccessRequestsHistory provides records of all changes to the state of an AccessRequest.
261 262 263 |
# File 'lib/strongdm.rb', line 261 def access_requests_history @access_requests_history end |
#account_attachments ⇒ Object (readonly)
AccountAttachments assign an account to a role.
See AccountAttachments.
265 266 267 |
# File 'lib/strongdm.rb', line 265 def @account_attachments end |
#account_attachments_history ⇒ Object (readonly)
AccountAttachmentsHistory records all changes to the state of an AccountAttachment.
269 270 271 |
# File 'lib/strongdm.rb', line 269 def @account_attachments_history end |
#account_grants ⇒ Object (readonly)
AccountGrants assign a resource directly to an account, giving the account the permission to connect to that resource.
See AccountGrants.
273 274 275 |
# File 'lib/strongdm.rb', line 273 def account_grants @account_grants end |
#account_grants_history ⇒ Object (readonly)
AccountGrantsHistory records all changes to the state of an AccountGrant.
See AccountGrantsHistory.
277 278 279 |
# File 'lib/strongdm.rb', line 277 def account_grants_history @account_grants_history end |
#account_permissions ⇒ Object (readonly)
AccountPermissions records the granular permissions accounts have, allowing them to execute relevant commands via StrongDM's APIs.
See AccountPermissions.
282 283 284 |
# File 'lib/strongdm.rb', line 282 def @account_permissions end |
#account_resources ⇒ Object (readonly)
AccountResources enumerates the resources to which accounts have access. The AccountResources service is read-only.
See AccountResources.
287 288 289 |
# File 'lib/strongdm.rb', line 287 def account_resources @account_resources end |
#account_resources_history ⇒ Object (readonly)
AccountResourcesHistory records all changes to the state of a AccountResource.
291 292 293 |
# File 'lib/strongdm.rb', line 291 def account_resources_history @account_resources_history end |
#accounts ⇒ Object (readonly)
Accounts are users that have access to strongDM. There are two types of accounts:
- Users: humans who are authenticated through username and password or SSO.
- Service Accounts: machines that are authenticated using a service token.
- Tokens are access keys with permissions that can be used for authentication.
See Accounts.
298 299 300 |
# File 'lib/strongdm.rb', line 298 def accounts @accounts end |
#accounts_groups ⇒ Object (readonly)
An AccountGroup links an account and a group.
See AccountsGroups.
302 303 304 |
# File 'lib/strongdm.rb', line 302 def accounts_groups @accounts_groups end |
#accounts_groups_history ⇒ Object (readonly)
AccountsGroupsHistory records all changes to the state of an AccountGroup.
306 307 308 |
# File 'lib/strongdm.rb', line 306 def accounts_groups_history @accounts_groups_history end |
#accounts_history ⇒ Object (readonly)
AccountsHistory records all changes to the state of an Account.
See AccountsHistory.
310 311 312 |
# File 'lib/strongdm.rb', line 310 def accounts_history @accounts_history end |
#activities ⇒ Object (readonly)
An Activity is a record of an action taken against a strongDM deployment, e.g. a user creation, resource deletion, sso configuration change, etc. The Activities service is read-only.
See Activities.
316 317 318 |
# File 'lib/strongdm.rb', line 316 def activities @activities end |
#api_access_key ⇒ Object (readonly)
API authentication token (read-only).
245 246 247 |
# File 'lib/strongdm.rb', line 245 def api_access_key @api_access_key end |
#approval_workflow_approvers ⇒ Object (readonly)
ApprovalWorkflowApprovers link approval workflow approvers to an ApprovalWorkflowStep
320 321 322 |
# File 'lib/strongdm.rb', line 320 def approval_workflow_approvers @approval_workflow_approvers end |
#approval_workflow_approvers_history ⇒ Object (readonly)
ApprovalWorkflowApproversHistory records all changes to the state of an ApprovalWorkflowApprover.
324 325 326 |
# File 'lib/strongdm.rb', line 324 def approval_workflow_approvers_history @approval_workflow_approvers_history end |
#approval_workflow_steps ⇒ Object (readonly)
ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow
328 329 330 |
# File 'lib/strongdm.rb', line 328 def approval_workflow_steps @approval_workflow_steps end |
#approval_workflow_steps_history ⇒ Object (readonly)
ApprovalWorkflowStepsHistory records all changes to the state of an ApprovalWorkflowStep.
332 333 334 |
# File 'lib/strongdm.rb', line 332 def approval_workflow_steps_history @approval_workflow_steps_history end |
#approval_workflows ⇒ Object (readonly)
ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized approvers and be approved or denied.
See ApprovalWorkflows.
337 338 339 |
# File 'lib/strongdm.rb', line 337 def approval_workflows @approval_workflows end |
#approval_workflows_history ⇒ Object (readonly)
ApprovalWorkflowsHistory records all changes to the state of an ApprovalWorkflow.
341 342 343 |
# File 'lib/strongdm.rb', line 341 def approval_workflows_history @approval_workflows_history end |
#base_retry_delay ⇒ Object (readonly)
Returns the value of attribute base_retry_delay.
240 241 242 |
# File 'lib/strongdm.rb', line 240 def base_retry_delay @base_retry_delay end |
#control_panel ⇒ Object (readonly)
ControlPanel contains all administrative controls.
See SDM::ControlPanel.
345 346 347 |
# File 'lib/strongdm.rb', line 345 def control_panel @control_panel end |
#discovery_connectors ⇒ Object (readonly)
A Discovery Connector is a configuration object for performing Resource Scans in remote systems such as AWS, GCP, Azure, and other systems.
See DiscoveryConnectors.
350 351 352 |
# File 'lib/strongdm.rb', line 350 def discovery_connectors @discovery_connectors end |
#granted_account_entitlements ⇒ Object (readonly)
GrantedAccountEntitlements enumerates the resources to which an account has been granted access. The GrantedAccountEntitlements service is read-only.
355 356 357 |
# File 'lib/strongdm.rb', line 355 def granted_account_entitlements @granted_account_entitlements end |
#granted_resource_entitlements ⇒ Object (readonly)
GrantedResourceEntitlements enumerates the accounts that have been granted access to a given resource. The GrantedResourceEntitlements service is read-only.
360 361 362 |
# File 'lib/strongdm.rb', line 360 def granted_resource_entitlements @granted_resource_entitlements end |
#granted_role_entitlements ⇒ Object (readonly)
GrantedRoleEntitlements enumerates the resources to which a role grants access. The GrantedRoleEntitlements service is read-only.
365 366 367 |
# File 'lib/strongdm.rb', line 365 def granted_role_entitlements @granted_role_entitlements end |
#groups ⇒ Object (readonly)
A Group is a set of principals.
See Groups.
375 376 377 |
# File 'lib/strongdm.rb', line 375 def groups @groups end |
#groups_history ⇒ Object (readonly)
GroupsHistory records all changes to the state of a Group.
See GroupsHistory.
379 380 381 |
# File 'lib/strongdm.rb', line 379 def groups_history @groups_history end |
#groups_roles ⇒ Object (readonly)
A GroupRole is an assignment of a Group to a Role.
See GroupsRoles.
383 384 385 |
# File 'lib/strongdm.rb', line 383 def groups_roles @groups_roles end |
#groups_roles_history ⇒ Object (readonly)
GroupsRolesHistory records all changes to the state of a GroupRole.
See GroupsRolesHistory.
387 388 389 |
# File 'lib/strongdm.rb', line 387 def groups_roles_history @groups_roles_history end |
#health_checks ⇒ Object (readonly)
HealthChecks lists the last healthcheck between each node and resource. Note the unconventional capitalization here is to prevent having a collision with GRPC
See HealthChecks.
392 393 394 |
# File 'lib/strongdm.rb', line 392 def health_checks @health_checks end |
#identity_aliases ⇒ Object (readonly)
IdentityAliases assign an alias to an account within an IdentitySet. The alias is used as the username when connecting to a identity supported resource.
See IdentityAliases.
397 398 399 |
# File 'lib/strongdm.rb', line 397 def identity_aliases @identity_aliases end |
#identity_aliases_history ⇒ Object (readonly)
IdentityAliasesHistory records all changes to the state of a IdentityAlias.
401 402 403 |
# File 'lib/strongdm.rb', line 401 def identity_aliases_history @identity_aliases_history end |
#identity_sets ⇒ Object (readonly)
A IdentitySet is a named grouping of Identity Aliases for Accounts. An Account's relationship to a IdentitySet is defined via IdentityAlias objects.
See IdentitySets.
406 407 408 |
# File 'lib/strongdm.rb', line 406 def identity_sets @identity_sets end |
#identity_sets_history ⇒ Object (readonly)
IdentitySetsHistory records all changes to the state of a IdentitySet.
See IdentitySetsHistory.
410 411 412 |
# File 'lib/strongdm.rb', line 410 def identity_sets_history @identity_sets_history end |
#interceptor ⇒ Object (readonly)
Method interceptor for request/response hooks (read-only).
249 250 251 |
# File 'lib/strongdm.rb', line 249 def interceptor @interceptor end |
#managed_secrets ⇒ Object (readonly)
ManagedSecret is a private vertical for creating, reading, updating, deleting, listing and rotating the managed secrets in the secrets engines as an authenticated user.
See ManagedSecrets.
416 417 418 |
# File 'lib/strongdm.rb', line 416 def managed_secrets @managed_secrets end |
#max_retry_delay ⇒ Object (readonly)
Returns the value of attribute max_retry_delay.
241 242 243 |
# File 'lib/strongdm.rb', line 241 def max_retry_delay @max_retry_delay end |
#nodes ⇒ Object (readonly)
Nodes make up the StrongDM network, and allow your users to connect securely to your resources. There are three types of nodes:
- Relay: creates connectivity to your datasources, while maintaining the egress-only nature of your firewall
- Gateway: a relay that also listens for connections from StrongDM clients
- Proxy Cluster: a cluster of workers that together mediate access from clients to resources
See Nodes.
424 425 426 |
# File 'lib/strongdm.rb', line 424 def nodes @nodes end |
#nodes_history ⇒ Object (readonly)
NodesHistory records all changes to the state of a Node.
See NodesHistory.
428 429 430 |
# File 'lib/strongdm.rb', line 428 def nodes_history @nodes_history end |
#organization_history ⇒ Object (readonly)
OrganizationHistory records all changes to the state of an Organization.
See OrganizationHistory.
432 433 434 |
# File 'lib/strongdm.rb', line 432 def organization_history @organization_history end |
#page_limit ⇒ Object
Returns the value of attribute page_limit.
242 243 244 |
# File 'lib/strongdm.rb', line 242 def page_limit @page_limit end |
#peering_group_nodes ⇒ Object (readonly)
PeeringGroupNodes provides the building blocks necessary to obtain attach a node to a peering group.
See PeeringGroupNodes.
436 437 438 |
# File 'lib/strongdm.rb', line 436 def peering_group_nodes @peering_group_nodes end |
#peering_group_peers ⇒ Object (readonly)
PeeringGroupPeers provides the building blocks necessary to link two peering groups.
See PeeringGroupPeers.
440 441 442 |
# File 'lib/strongdm.rb', line 440 def peering_group_peers @peering_group_peers end |
#peering_group_resources ⇒ Object (readonly)
PeeringGroupResources provides the building blocks necessary to obtain attach a resource to a peering group.
444 445 446 |
# File 'lib/strongdm.rb', line 444 def peering_group_resources @peering_group_resources end |
#peering_groups ⇒ Object (readonly)
PeeringGroups provides the building blocks necessary to obtain explicit network topology and routing.
See PeeringGroups.
448 449 450 |
# File 'lib/strongdm.rb', line 448 def peering_groups @peering_groups end |
#policies ⇒ Object (readonly)
Policies are the collection of one or more statements that enforce fine-grained access control for the users of an organization.
See Policies.
453 454 455 |
# File 'lib/strongdm.rb', line 453 def policies @policies end |
#policies_history ⇒ Object (readonly)
PoliciesHistory records all changes to the state of a Policy.
See PoliciesHistory.
457 458 459 |
# File 'lib/strongdm.rb', line 457 def policies_history @policies_history end |
#proxy_cluster_keys ⇒ Object (readonly)
Proxy Cluster Keys are authentication keys for all proxies within a cluster. The proxies within a cluster share the same key. One cluster can have multiple keys in order to facilitate key rotation.
See ProxyClusterKeys.
463 464 465 |
# File 'lib/strongdm.rb', line 463 def proxy_cluster_keys @proxy_cluster_keys end |
#queries ⇒ Object (readonly)
A Query is a record of a single client request to a resource, such as a SQL query. Long-running SSH, RDP, or Kubernetes interactive sessions also count as queries. The Queries service is read-only.
See Queries.
469 470 471 |
# File 'lib/strongdm.rb', line 469 def queries @queries end |
#remote_identities ⇒ Object (readonly)
RemoteIdentities assign a resource directly to an account, giving the account the permission to connect to that resource.
See RemoteIdentities.
473 474 475 |
# File 'lib/strongdm.rb', line 473 def remote_identities @remote_identities end |
#remote_identities_history ⇒ Object (readonly)
RemoteIdentitiesHistory records all changes to the state of a RemoteIdentity.
477 478 479 |
# File 'lib/strongdm.rb', line 477 def remote_identities_history @remote_identities_history end |
#remote_identity_groups ⇒ Object (readonly)
A RemoteIdentityGroup is a named grouping of Remote Identities for Accounts. An Account's relationship to a RemoteIdentityGroup is defined via RemoteIdentity objects.
See RemoteIdentityGroups.
482 483 484 |
# File 'lib/strongdm.rb', line 482 def remote_identity_groups @remote_identity_groups end |
#remote_identity_groups_history ⇒ Object (readonly)
RemoteIdentityGroupsHistory records all changes to the state of a RemoteIdentityGroup.
486 487 488 |
# File 'lib/strongdm.rb', line 486 def remote_identity_groups_history @remote_identity_groups_history end |
#replays ⇒ Object (readonly)
A Replay captures the data transferred over a long-running SSH, RDP, or Kubernetes interactive session (otherwise referred to as a query). The Replays service is read-only.
See Replays.
491 492 493 |
# File 'lib/strongdm.rb', line 491 def replays @replays end |
#requestable_account_entitlements ⇒ Object (readonly)
RequestableAccountEntitlements enumerates the resources that an account is permitted to request access to. The RequestableAccountEntitlements service is read-only.
496 497 498 |
# File 'lib/strongdm.rb', line 496 def requestable_account_entitlements @requestable_account_entitlements end |
#requestable_resource_entitlements ⇒ Object (readonly)
RequestableResourceEntitlements enumerates the accounts that are permitted to request access to a given resource. The RequestableResourceEntitlements service is read-only.
501 502 503 |
# File 'lib/strongdm.rb', line 501 def requestable_resource_entitlements @requestable_resource_entitlements end |
#requestable_role_entitlements ⇒ Object (readonly)
RequestableRoleEntitlements enumerates the resources that a role permits its members to request access to. The RequestableRoleEntitlements service is read-only.
506 507 508 |
# File 'lib/strongdm.rb', line 506 def requestable_role_entitlements @requestable_role_entitlements end |
#resources ⇒ Object (readonly)
Resources are databases, servers, clusters, websites, or clouds that strongDM delegates access to.
See Resources.
511 512 513 |
# File 'lib/strongdm.rb', line 511 def resources @resources end |
#resources_history ⇒ Object (readonly)
ResourcesHistory records all changes to the state of a Resource.
See ResourcesHistory.
515 516 517 |
# File 'lib/strongdm.rb', line 515 def resources_history @resources_history end |
#role_resources ⇒ Object (readonly)
RoleResources enumerates the resources to which roles have access. The RoleResources service is read-only.
See RoleResources.
520 521 522 |
# File 'lib/strongdm.rb', line 520 def role_resources @role_resources end |
#role_resources_history ⇒ Object (readonly)
RoleResourcesHistory records all changes to the state of a RoleResource.
See RoleResourcesHistory.
524 525 526 |
# File 'lib/strongdm.rb', line 524 def role_resources_history @role_resources_history end |
#roles ⇒ Object (readonly)
A Role has a list of access rules which determine which Resources the members of the Role have access to. An Account can be a member of multiple Roles via AccountAttachments.
See Roles.
371 372 373 |
# File 'lib/strongdm.rb', line 371 def roles @roles end |
#roles_history ⇒ Object (readonly)
RolesHistory records all changes to the state of a Role.
See RolesHistory.
528 529 530 |
# File 'lib/strongdm.rb', line 528 def roles_history @roles_history end |
#secret_engines ⇒ Object (readonly)
See SecretEngines.
536 537 538 |
# File 'lib/strongdm.rb', line 536 def secret_engines @secret_engines end |
#secret_store_healths ⇒ Object (readonly)
SecretStoreHealths exposes health states for secret stores.
See SecretStoreHealths.
540 541 542 |
# File 'lib/strongdm.rb', line 540 def secret_store_healths @secret_store_healths end |
#secret_stores ⇒ Object (readonly)
SecretStores are servers where resource secrets (passwords, keys) are stored.
See SecretStores.
532 533 534 |
# File 'lib/strongdm.rb', line 532 def secret_stores @secret_stores end |
#secret_stores_history ⇒ Object (readonly)
SecretStoresHistory records all changes to the state of a SecretStore.
See SecretStoresHistory.
544 545 546 |
# File 'lib/strongdm.rb', line 544 def secret_stores_history @secret_stores_history end |
#snapshot_time ⇒ Object
Optional timestamp at which to provide historical data
247 248 249 |
# File 'lib/strongdm.rb', line 247 def snapshot_time @snapshot_time end |
#workflow_approvers ⇒ Object (readonly)
WorkflowApprovers is an account or a role with the ability to approve requests bound to a workflow.
See WorkflowApprovers.
548 549 550 |
# File 'lib/strongdm.rb', line 548 def workflow_approvers @workflow_approvers end |
#workflow_approvers_history ⇒ Object (readonly)
WorkflowApproversHistory provides records of all changes to the state of a WorkflowApprover.
552 553 554 |
# File 'lib/strongdm.rb', line 552 def workflow_approvers_history @workflow_approvers_history end |
#workflow_roles ⇒ Object (readonly)
WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of to request access to a resource via the workflow.
See WorkflowRoles.
557 558 559 |
# File 'lib/strongdm.rb', line 557 def workflow_roles @workflow_roles end |
#workflow_roles_history ⇒ Object (readonly)
WorkflowRolesHistory provides records of all changes to the state of a WorkflowRole
See WorkflowRolesHistory.
561 562 563 |
# File 'lib/strongdm.rb', line 561 def workflow_roles_history @workflow_roles_history end |
#workflows ⇒ Object (readonly)
Workflows are the collection of rules that define the resources to which access can be requested, the users that can request that access, and the mechanism for approving those requests which can either be automatic approval or a set of users authorized to approve the requests.
See Workflows.
567 568 569 |
# File 'lib/strongdm.rb', line 567 def workflows @workflows end |
#workflows_history ⇒ Object (readonly)
WorkflowsHistory provides records of all changes to the state of a Workflow.
See WorkflowsHistory.
571 572 573 |
# File 'lib/strongdm.rb', line 571 def workflows_history @workflows_history end |
Instance Method Details
#close ⇒ Object
Closes this client and releases all resources held by it.
139 140 141 142 143 144 145 |
# File 'lib/strongdm.rb', line 139 def close begin @channel.close() rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end end |
#max_retries ⇒ Object
236 237 238 |
# File 'lib/strongdm.rb', line 236 def max_retries 3 end |
#sign(method_name, msg_bytes) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/strongdm.rb', line 157 def sign(method_name, msg_bytes) current_utc_date = Time.now.utc date = sprintf("%04d-%02d-%02d", current_utc_date.year, current_utc_date.month, current_utc_date.day) signing_key = OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, @api_secret_key, date) signing_key = OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, signing_key, "sdm_api_v1") sha_req = Digest::SHA256.new sha_req << method_name sha_req << "\n" sha_req << msg_bytes request_hash = sha_req.digest return Base64.strict_encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, signing_key, request_hash)) end |
#snapshot_at(snapshot_time) ⇒ Object
Constructs a read-only client that will provide historical data from the provided timestamp. See SnapshotClient.
229 230 231 232 233 |
# File 'lib/strongdm.rb', line 229 def snapshot_at(snapshot_time) client = self.clone client.snapshot_time = snapshot_time return SnapshotClient.new(client) end |