Skip to content

Commit

Permalink
Fixed rule testing (#5)
Browse files Browse the repository at this point in the history
* Fixing rule testing

* Updated config

* re-added enterprise

* Addressed PR comments

* Copied over missing permission

* Updated integration tests

* Fixed formatting
  • Loading branch information
nhakmiller authored Jan 21, 2020
1 parent 50a986b commit e745e38
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 331 deletions.
10 changes: 10 additions & 0 deletions api/gateway/analysis/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,13 @@ definitions:
items:
$ref: '#/definitions/UnitTest'

AnalysisType:
type: string
enum:
- POLICY
- RULE


UpdatePolicy:
type: object
properties:
Expand Down Expand Up @@ -951,10 +958,13 @@ definitions:
$ref: '#/definitions/TypeSet'
tests:
$ref: '#/definitions/TestSuite'
analysisType:
$ref: '#/definitions/AnalysisType'
required:
- body
- resourceTypes
- tests
- analysisType

TestPolicyResult:
type: object
Expand Down
80 changes: 80 additions & 0 deletions api/gateway/analysis/models/analysis_type.go

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

20 changes: 20 additions & 0 deletions api/gateway/analysis/models/test_policy.go

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

7 changes: 5 additions & 2 deletions deployments/core/analysis_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ Resources:
COMPLIANCE_API_HOST: !Sub '${ComplianceApiId}.execute-api.${AWS::Region}.amazonaws.com'
COMPLIANCE_API_PATH: v1
DEBUG: !Ref Debug
ENGINE: panther-policy-engine
POLICY_ENGINE: panther-policy-engine
RULES_ENGINE: panther-rules-engine
RESOURCE_QUEUE_URL: !Sub https://sqs.${AWS::Region}.amazonaws.com/${AWS::AccountId}/panther-resources
TABLE: !Ref Table
FunctionName: panther-analysis-api
Expand All @@ -122,7 +123,9 @@ Resources:
-
Effect: Allow
Action: lambda:InvokeFunction
Resource: !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:panther-policy-engine
Resource:
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:panther-policy-engine
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:panther-rules-engine
-
Id: ManageDataStores
Version: 2012-10-17
Expand Down
52 changes: 0 additions & 52 deletions enterprise/web/build-utils/dir-content-replacement-plugin.js

This file was deleted.

Loading

0 comments on commit e745e38

Please sign in to comment.