Skip to content

Commit

Permalink
Issue #69, Minor tweaks to show model command in hexa CLI. Updated de…
Browse files Browse the repository at this point in the history
…pendencies, Set version to 0.8

Signed-off-by: Phil Hunt <[email protected]>
  • Loading branch information
independentid committed Nov 27, 2024
1 parent 22511fa commit 3c1f1bc
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 129 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,23 @@ This project provides:
Policy Mapper supports the following capabilities:

Syntactical Mapping
: Policy formats that have a parsable format or language, and can be represented in a "tuple" (subject, action, resource, conditions, scope) are considered "syntactical". Policy-Mapper can map these formats to and from IDQL JSON format. Examples include: IDQL, Cedar, GCP Bind among others.
: Policy formats that have a parsable format or language, and can be represented in a "tuple" (subject, action, resource, conditions, scope) are considered "syntactical". Policy-Mapper can map these formats to and from IDQL JSON format. Examples include: IDQL, Cedar, GCP Bind among others. Syntactical Mapping support is provided for:

* Google Bind Policy and Google Conditional Expression Language (CEL)
* AWS Verified Permissions and Cedar policy language including support for CEL

RBAC API Mapping
: Some systems do not directly have a policy language but support role or group based access control settings through an API.

Policy Provisioning
: Policy Mapper combines a set of Providers that call APIs to retrieve and map access policy as well as be able to set policy.

Syntactical Mapping support is provided for:
* Google Bind Policy and Google Conditional Expression Language (CEL)
* AWS Verified Permissions and Cedar policy language including support for CEL
Policy Validation
: IDQL Policies may be validated against a [Policy Information Model](docs/PolicyInfoModels.md) which specifies entities (subjects, resources), their schema,
and how actions may be applied by subject entities against resource entities.

Policy Entity Syntax
: New [policy syntax is available](docs/EntityValueFormat.md) that may be used in conjunction with Policy Validation. This is also useful when mapping to and from Cedar Policy Language.

Provisioning support is provided for:
* Google [Policy for IAP Secured Resources](https://cloud.google.com/iap/docs/managing-access) (Application Engine and Compute Engine)
Expand Down
4 changes: 2 additions & 2 deletions cmd/hexa/hexa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ func (suite *testSuite) Test11_LoadShowAndValidateModel() {
testLog.Println(string(res))

match := `listPhotos, applies to
Subjects: User, UserGroup
Objects: Photo`
Subjects -> User, UserGroup
Objects -> Photo`
assert.Contains(suite.T(), string(res), match)

// Perform validate
Expand Down
2 changes: 1 addition & 1 deletion cmd/hexa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hexa-org/policy-mapper/sdk"
)

const Version string = "0.7.2"
const Version string = "0.8.0"

type ParserData struct {
parser *kong.Kong
Expand Down
81 changes: 41 additions & 40 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,62 @@ require (
github.com/MicahParks/jwkset v0.5.20
github.com/MicahParks/keyfunc/v3 v3.3.5
github.com/alecthomas/assert/v2 v2.11.0
github.com/alecthomas/kong v1.2.1
github.com/alecthomas/kong v1.4.0
github.com/alecthomas/participle/v2 v2.1.1
github.com/alexedwards/scs/v2 v2.8.0
github.com/aws/aws-sdk-go-v2 v1.32.3
github.com/aws/aws-sdk-go-v2/config v1.28.1
github.com/aws/aws-sdk-go-v2/credentials v1.17.42
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.15.13
github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.46.3
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.3
github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2
github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.19.3
github.com/aws/aws-sdk-go-v2 v1.32.4
github.com/aws/aws-sdk-go-v2/config v1.28.3
github.com/aws/aws-sdk-go-v2/credentials v1.17.44
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.15.15
github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.46.5
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.5
github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3
github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.20.1
github.com/cedar-policy/cedar-go v0.4.0
github.com/chzyer/readline v1.5.1
github.com/coreos/go-oidc/v3 v3.11.0
github.com/envoyproxy/go-control-plane v0.13.1
github.com/go-playground/validator/v10 v10.22.1
github.com/gofrs/flock v0.12.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/cel-go v0.21.0
github.com/google/cel-go v0.22.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/hhsnopek/etag v0.0.0-20171206181245-aea95f647346
github.com/prometheus/client_golang v1.20.5
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/oauth2 v0.23.0
google.golang.org/api v0.203.0
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
golang.org/x/oauth2 v0.24.0
google.golang.org/api v0.205.0
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28
)

require (
cloud.google.com/go/auth v0.9.9 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cel.dev/expr v0.18.0 // indirect
cloud.google.com/go/auth v0.10.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.1 // indirect
github.com/alecthomas/repr v0.4.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.22 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect
github.com/aws/smithy-go v1.22.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
Expand Down Expand Up @@ -96,17 +97,17 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/tj/assert v0.0.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.7.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/grpc v1.67.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.8.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/grpc v1.68.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 3c1f1bc

Please sign in to comment.