cognitoProvider

package
v0.6.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Hexa

Amazon Cognito Provider

The Cognito Provider is a virtual provider that processes a Cognito User Pool and converts the RBAC relationships defined in the Groups to generate equivalent IDQL policy. The provider does this by interrogating User Pools and their associated resources. In general, Groups are mapped to IDQL Actions, and Resources are mapped to resource_id.

Feature Description Platform Support Provider Support
RBAC Support for basic translation of role-based access policy Yes Yes
ABAC Support for attribute conditions No No
Type Policy is described 'syntactically' in an exportable
format or implied through 'role' based relationships
Directory Groups Virtual RBAC
Attribute Mapping Attribute names in policy can be mapped to platform N/A
Hexa CLI Supported in the Hexa CLI application Yes
Discovery Supports discovery of Policy Application Points List UserPools and Resources Yes
Get Policies Supports retrieval of all policies from a PAP Conversion Yes
Set Policies Supports the ability to apply a set of policies to a PAP Conversion Yes
Reconcile Returns the differences between an existing set of policies (e.g. at the source) and another set (updates) virtual

Policy Support Notes

The following is an example IDQL mapped Policy from Cognito:

{
  "meta": {
    "version": "0.6",
    "providerType": "cognito"
  },
  "subject": {
    "members": [
      "user:saagarwal@gmail.com"
    ]
  },
  "actions": [
    {
      "actionUri": "GET/humanresources/eu"
    }
  ],
  "object": {
    "resource_id": "canarybankapi"
  }
}

Limitations:

  • Condition clauses cannot be mapped (RBAC only)

Documentation

Index

Constants

View Source
const ProviderTypeAwsCognito string = "cognito"

Variables

This section is empty.

Functions

This section is empty.

Types

type CognitoProvider added in v0.6.2

type CognitoProvider struct {
	AwsClientOpts awscommon.AWSClientOptions
}

func (*CognitoProvider) DiscoverApplications added in v0.6.2

func (*CognitoProvider) GetPolicyInfo added in v0.6.2

func (*CognitoProvider) Name added in v0.6.2

func (a *CognitoProvider) Name() string

func (*CognitoProvider) SetPolicyInfo added in v0.6.2

func (a *CognitoProvider) SetPolicyInfo(info policyprovider.IntegrationInfo, applicationInfo policyprovider.ApplicationInfo, policyInfos []hexapolicy.PolicyInfo) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL