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

0.6.0 dev temporary - do not merge #381

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d81efd5
renamed internal/policysupport to pkg/hexapolicy
saurabh-io Sep 8, 2023
bc27565
removed all policyInfo and google stuff, using policy-mapper
saurabh-io Sep 8, 2023
3b0a181
Update to v0.6.0-alpha.3, fix go file using prev version of slices.So…
saurabh-io Sep 8, 2023
39f1653
removed all cedar,gcp,policy stuff
saurabh-io Sep 8, 2023
c1c67d5
removed hexapolicy policy_support
saurabh-io Sep 8, 2023
85afea2
1 - Separate core, aws module
saurabh-io Oct 15, 2023
0419029
2 - moved everying from v1 into demo directory
saurabh-io Oct 15, 2023
8b687a2
3 - demo dir that contains all v1
saurabh-io Oct 15, 2023
77b9ebd
update github actions since demo dir split
saurabh-io Oct 15, 2023
9ec5e6c
update github actions again since demo dir split
saurabh-io Oct 15, 2023
582b51e
github action cd into demo
saurabh-io Oct 15, 2023
0cd4853
fist draft of sdk/core module
saurabh-io Oct 26, 2023
79f584d
fist draft of sdk/provideraws/awscommon module
saurabh-io Oct 26, 2023
432cc1b
first draft cognitoidp module
saurabh-io Oct 26, 2023
2ba1e96
first draft dynamodbpolicystore module
saurabh-io Oct 26, 2023
299232c
fix cognito idp module path
saurabh-io Oct 27, 2023
b4bbeab
update alpha3
saurabh-io Oct 27, 2023
290af26
upgrade alpha4
saurabh-io Oct 27, 2023
aeb830e
upgrade alpha4
saurabh-io Oct 27, 2023
6aa25c6
update to alpha5
saurabh-io Oct 30, 2023
68d40b4
upgrade alpha5
saurabh-io Oct 30, 2023
5ef2277
upgrade alpha5
saurabh-io Oct 30, 2023
5ec8a1f
alpha6
saurabh-io Oct 30, 2023
160e32a
alpha6
saurabh-io Oct 30, 2023
d1b9f8b
alpha6
saurabh-io Oct 30, 2023
b43ab15
alpha7
saurabh-io Oct 30, 2023
0c52d12
delete apigwprovider module
saurabh-io Oct 30, 2023
9096575
demo go mod and sum
saurabh-io Oct 30, 2023
608d5ba
fix rar tests before signoff
saurabh-io Oct 30, 2023
fe0763b
add temp go work and sum for sdk
saurabh-io Oct 30, 2023
132cd60
cognitoidp to alpha8
saurabh-io Oct 30, 2023
b49fdd1
dynamodbstore to alpha8
saurabh-io Oct 30, 2023
bb80ed2
update demo to alpha8
saurabh-io Oct 30, 2023
02ddf96
dynamodb simple and dynamic mappers
saurabh-io Nov 15, 2023
3821b01
cognitoidp go mod cleanup
saurabh-io Nov 15, 2023
5c104c9
use go work for demo, integrate aws demo with sdk
saurabh-io Nov 15, 2023
b5691b3
prepare github workflow
saurabh-io Dec 1, 2023
e410953
run tests from workflow
saurabh-io Dec 1, 2023
00c3ca1
add x to test_workspace and run without sh ..
saurabh-io Dec 1, 2023
61e80a9
run tests with coverage
saurabh-io Dec 1, 2023
3ebb23d
Add disclaimer to go.work
saurabh-io Dec 1, 2023
c4fdd0b
merged main and fix conflicts
saurabh-io Dec 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/workflows/hexa-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ jobs:
sudo mv migrate.linux-amd64 /usr/bin/migrate
- name: migrate
run: |
migrate -verbose -path ./databases/orchestrator -database postgres://orchestrator:orchestrator@localhost:5432/orchestrator_test?sslmode=disable up
migrate -verbose -path ./demo/databases/orchestrator -database postgres://orchestrator:orchestrator@localhost:5432/orchestrator_test?sslmode=disable up
- name: opa
run: |
curl -L -o opa https://github.com/open-policy-agent/opa/releases/download/v0.38.1/opa_linux_amd64
chmod 755 opa
sudo mv opa /usr/bin/opa
- name: test
run: |
go test -tags integration -coverprofile coverage.out ./.../
./test_workspace.sh
#cd demo
#go test -tags integration -coverprofile coverage.out ./.../
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/admin/admin.go → demo/cmd/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"fmt"
"github.com/hexa-org/policy-orchestrator/internal/admin"
"github.com/hexa-org/policy-orchestrator/demo/internal/admin"
"log"
"net"
"net/http"
"os"

"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
)

func App(addr string, orchestratorUrl string, orchestratorKey string) *http.Server {
Expand Down
4 changes: 2 additions & 2 deletions cmd/admin/admin_test.go → demo/cmd/admin/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"testing"

"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/golang-jwt/jwt"
"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/hexa-org/policy-orchestrator/cmd/demo/amazonsupport"
"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/amazonsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/hexa-org/policy-orchestrator/cmd/demo/azuresupport"
"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/azuresupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/demo/demo.go → demo/cmd/demo/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
"path/filepath"
"runtime"

"github.com/hexa-org/policy-orchestrator/internal/decisionsupport"
"github.com/hexa-org/policy-orchestrator/internal/decisionsupportproviders"
"github.com/hexa-org/policy-orchestrator/demo/internal/decisionsupport"
"github.com/hexa-org/policy-orchestrator/demo/internal/decisionsupportproviders"

"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/hexa-org/policy-orchestrator/cmd/demo/amazonsupport"
"github.com/hexa-org/policy-orchestrator/cmd/demo/azuresupport"
"github.com/hexa-org/policy-orchestrator/cmd/demo/googlesupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/amazonsupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/azuresupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/googlesupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
)

//go:embed resources/static
Expand Down
4 changes: 2 additions & 2 deletions cmd/demo/demo_test.go → demo/cmd/demo/demo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"testing"
"time"

"github.com/hexa-org/policy-orchestrator/pkg/databasesupport"
"github.com/hexa-org/policy-orchestrator/pkg/hawksupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/databasesupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/hawksupport"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/hexa-org/policy-orchestrator/cmd/demo/googlesupport"
"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/cmd/demo/googlesupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"crypto/tls"
"fmt"

"github.com/hexa-org/policy-orchestrator/pkg/compressionsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/compressionsupport"

"io/fs"
"log"
Expand All @@ -20,7 +20,7 @@ import (
"time"

"github.com/gorilla/mux"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
)

func App(addr string) *http.Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"crypto/x509"
"fmt"

"github.com/hexa-org/policy-orchestrator/pkg/compressionsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/compressionsupport"

"mime/multipart"
"net"
Expand All @@ -17,8 +17,8 @@ import (
"testing"
"time"

"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ package main
import (
"database/sql"
"fmt"
"github.com/hexa-org/policy-orchestrator/internal/orchestrator"
"github.com/hexa-org/policy-orchestrator/internal/orchestratorproviders/amazonwebservices/awsapigw"
"github.com/hexa-org/policy-orchestrator/internal/orchestratorproviders/googlecloud"
"github.com/hexa-org/policy-orchestrator/internal/orchestratorproviders/microsoftazure/azarm"
"github.com/hexa-org/policy-orchestrator/internal/orchestratorproviders/openpolicyagent"
"github.com/hexa-org/policy-orchestrator/demo/internal/orchestrator"
"github.com/hexa-org/policy-orchestrator/demo/internal/orchestratorproviders/amazonwebservices/awsapigw"
"github.com/hexa-org/policy-orchestrator/demo/internal/orchestratorproviders/googlecloud"
"github.com/hexa-org/policy-orchestrator/demo/internal/orchestratorproviders/microsoftazure/azarm"
"github.com/hexa-org/policy-orchestrator/demo/internal/orchestratorproviders/openpolicyagent"
log "golang.org/x/exp/slog"
"net"
"net/http"
"os"

"github.com/hexa-org/policy-orchestrator/pkg/databasesupport"
"github.com/hexa-org/policy-orchestrator/pkg/hawksupport"
"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/pkg/workflowsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/databasesupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/hawksupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/workflowsupport"
)

type DatabaseHealthCheck struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"runtime"
"testing"

"github.com/hexa-org/policy-orchestrator/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/pkg/websupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/healthsupport"
"github.com/hexa-org/policy-orchestrator/demo/pkg/websupport"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
107 changes: 107 additions & 0 deletions demo/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
module github.com/hexa-org/policy-orchestrator/demo

go 1.20

// +heroku goVersion go1.20

// SAURABH TEMP REPACE FOR LOCAL DEV
//replace github.com/hexa-org/policy-orchestrator/sdk/core => ../sdk/core
//replace github.com/hexa-org/policy-orchestrator/sdk/provideraws/cognitoidp => ../sdk/provideraws/cognitoidp
//replace github.com/hexa-org/policy-orchestrator/sdk/provideraws/policystore/dynamodbpolicystore => ../sdk/provideraws/policystore/dynamodbpolicystore

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1
github.com/aws/aws-sdk-go-v2 v1.21.2
github.com/aws/aws-sdk-go-v2/config v1.18.45
github.com/aws/aws-sdk-go-v2/credentials v1.13.43
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.42
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.13.14
github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.27.0
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.22.2
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0
github.com/envoyproxy/go-control-plane v0.11.1 // indirect
github.com/go-playground/validator/v10 v10.11.2
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/cel-go v0.18.0 // indirect
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/sessions v1.2.1
github.com/hiyosi/hawk v1.0.1
github.com/lib/pq v1.10.7
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
google.golang.org/api v0.139.0
gopkg.in/square/go-jose.v2 v2.6.0
)

require (
github.com/hexa-org/policy-mapper/hexaIdql v0.6.0-alpha.3
github.com/hexa-org/policy-mapper/mapper/formats/gcpBind v0.6.0-alpha.3
github.com/hexa-org/policy-orchestrator/sdk/core v0.6.0-alpha.8
github.com/hexa-org/policy-orchestrator/sdk/provideraws/cognitoidp v0.6.0-alpha.8
github.com/hexa-org/policy-orchestrator/sdk/provideraws/policystore/dynamodbpolicystore v0.6.0-alpha.8
)

require (
github.com/hexa-org/policy-orchestrator/sdk/provideraws/awscommon v0.6.0-alpha.8 // indirect
golang.org/x/sync v0.4.0 // indirect
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.15.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.37 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
github.com/aws/smithy-go v1.15.0 // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/hexa-org/policy-mapper/mapper/conditionLangs/gcpcel v0.6.0-alpha.3 // indirect
//github.com/hexa-org/policy-orchestrator/sdk/provideraws/awscommon v0.6.0-alpha.8 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.58.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading