-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: adds support to import security profiles #342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue with multiple filters, not creating multiple score paths as per: https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.securityProfiles.environments/computeEnvironmentScores
gorun securityprofiles compute --org=$ORG --name=via-apigeecli --env=dev --filters='/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-v1,/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-oauth-v1'
{
"error": {
"code": 400,
"message": "invalid score path in filter: \"/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-v1,/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-oauth-v1\"",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.RequestInfo",
"requestId": "7699576027614491976"
}
]
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using multiple filter params works to create the proper request, the 500 error also exists in the API.
gorun securityprofiles compute --org=$ORG --name=via-apigeecli --env=dev \
--filters='/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-v1' \
--filters='/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-oauth-v1' \
--start-time=2023-12-10T00:00:00Z --end-time=2023-12-12T00:00:00Z
{
"timeRange": {
"startTime": "2023-12-10T00:00:00Z",
"endTime": "2023-12-12T00:00:00Z"
},
"filters": [
{
"scorePath": "/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-v1"
},
{
"scorePath": "/org@apigeex-mint-kurt/envgroup@dev/env@dev/proxies/proxy@pingstatus-oauth-v1"
}
]
}
Response is same as from API
{
"error": {
"code": 500,
"message": "error while fetching score for \"organizations/apigeex-mint-kurt/securityProfiles/via-apigeecli/environments/dev\"",
"status": "INTERNAL",
"details": [
{
"@type": "type.googleapis.com/google.rpc.RequestInfo",
"requestId": "4120055890593857543"
}
]
}
}
No description provided.