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

As an auditor, I can see that information about destination protocol … #2496

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

moleske
Copy link
Member

@moleske moleske commented Sep 8, 2021

…in map-route audit events

Root Issue: cloudfoundry/routing-release#200

Co-authored-by: Greg Cobb gcobb@pivotal.io
Co-authored-by: Michael Oleske moleske@pivotal.io

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

  • A short explanation of the proposed change:
    When I map a route to an app then the requested destination protocol should appear in the audit event. The audit event should include the protocol request by the user. If the user does not specify a protocol (thereby using the default protocol for the mapped route), then the audit even should have null protocol.

  • An explanation of the use cases your change solves
    Auditors can get http2 usage data through the monitoring the map route event

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

cc @Gerg

…in map-route audit events

Co-authored-by: Greg Cobb <gcobb@pivotal.io>
Co-authored-by: Michael Oleske <moleske@pivotal.io>
@JenGoldstrich
Copy link
Contributor

Acceptance

Pushed dora on a bosh lite with this PR deployed

Created a new route on v8 edge build CLI
$ cf create-route bosh.lite.api --hostname cool-app Creating route cool-app.bosh.lite.api for org org / space space as admin... Route cool-app.bosh.lite.api has been created. OK

Map-route with http2 in edge CLI
cf map-route dora bosh.lite.api --hostname cool-app --destination-protocol http2 Mapping route cool-app.bosh.lite.api to app dora with protocol http2 in org org / space space as admin... OK

See event for map route with cf events
$ cf events dora Getting events for app dora in org org / space space as admin... time event actor description 2021-09-09T18:37:16.00+0000 audit.app.map-route admin 2021-09-09T18:35:30.00+0000 audit.app.restart admin 2021-09-09T18:35:30.00+0000 audit.app.process.create admin 2021-09-09T18:35:30.00+0000 audit.app.droplet.mapped admin 2021-09-09T18:35:30.00+0000 audit.app.revision.create admin 2021-09-09T18:35:23.00+0000 audit.app.droplet.create admin 2021-09-09T18:34:52.00+0000 audit.app.build.create admin 2021-09-09T18:34:49.00+0000 audit.app.package.create admin 2021-09-09T18:34:49.00+0000 audit.app.package.upload admin 2021-09-09T18:34:46.00+0000 audit.app.update admin 2021-09-09T18:34:46.00+0000 audit.app.map-route admin 2021-09-09T18:34:46.00+0000 audit.app.update admin 2021-09-09T18:34:42.00+0000 audit.app.process.create admin 2021-09-09T18:34:42.00+0000 audit.app.create admin 2021-09-09T18:34:42.00+0000 audit.app.apply_manifest admin

See http2 protocol field in map route event
cf events dora -v | grep http2 -C 10 "actor": { "guid": "f1639818-b0f7-4386-bd58-0f26fa5973c3", "name": "admin", "type": "user" }, "created_at": "2021-09-09T18:37:16Z", "data": { "app_port": 8080, "destination_guid": "0e485045-2d7b-4daa-9725-5803d8cd8e16", "process_type": "web", "protocol": "http2", "route_guid": "41855551-9f0e-4acf-a04f-94e775b7fa04", "route_mapping_guid": "0e485045-2d7b-4daa-9725-5803d8cd8e16", "weight": null }, "guid": "492a8b7c-fa9b-47bf-8c2f-adca4c9338fe", "links": { "self": { "href": "https://api.bosh.lite.api/v3/audit_events/492a8b7c-fa9b-47bf-8c2f-adca4c9338fe" } },

Looks great to me, thanks for the PR!

Merging

@JenGoldstrich JenGoldstrich merged commit 2c68c74 into main Sep 9, 2021
@moleske moleske deleted the http2_route_mapping_audit_events branch September 9, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants