Commit Graph

46 Commits

Author SHA1 Message Date
jacob-delgado 7ab9a9d589
Update envoyproxy (#4583)
* Automator: update envoy@ in istio/proxy@master

* Revert changes made for security vuln testing

---------

Co-authored-by: istio-testing <istio-testing-bot@google.com>
2023-04-13 16:21:48 -07:00
Eric Van Norman b20d5b65dd
Update Envoy and add changes that came from the private build (#4563) 2023-04-05 18:20:49 -07:00
Douglas Reid 1717808002
stackdriver logging: better classify severity levels (#4043) 2022-09-06 12:34:31 -07:00
Douglas Reid d0d8b48184
stackdriver: add support for generic_node MR (#3771)
* stackdriver: add support for generic_node MR

* add checks for empty lists

* use StrJoin
2022-03-17 10:44:52 -07:00
Douglas Reid ff775f5605
Add support for configurability of stackdriver metrics (#3505)
* add support for configurability of stackdriver metrics

* add tag validity checks and support apiName and apiVersion tags

* cleanup

* address review comments

* more const refs

* update config doc

* update const refs

* push tagkey registration into configure()
2021-09-30 22:17:14 -07:00
Pengyuan Bian 1bd0066888
Update Envoy SHA 08/27. (#3470)
* Update Envoy SHA 08/26.

* update.

* fix.
2021-08-27 17:20:28 -07:00
Pengyuan Bian f1bacaa7dd
Remove Edge reporting. (#3379)
* remove edge

* build.

* fix

* update

* update.

* update.
2021-06-18 10:59:36 -07:00
Yangmin Zhu 0efe658755
fix the stackdriver logging for dry-run policy (#3361)
* fix the stackdriver logging for dry-run policy

* address comments
2021-05-20 21:07:01 -07:00
Kuat 2a6df0e935
stackdriver: harden against invalid utf8 (#3331)
* stackdriver: harden against invalid utf8

Signed-off-by: Kuat Yessenov <kuat@google.com>

* format

Signed-off-by: Kuat Yessenov <kuat@google.com>

* review

Signed-off-by: Kuat Yessenov <kuat@google.com>
2021-05-07 11:41:21 -07:00
Yangmin Zhu 806fdda01e
authz: add initial authz dry-run implementation (#3256)
* authz: add initial authz dry-run implementation

* fix tsan

* add tcp test

* do not use regex
2021-03-24 11:57:10 -07:00
Piotr Sikora a553a1ba10
Update Envoy SHA to latest. (#3239)
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2021-03-15 10:21:45 -07:00
Douglas Reid 64b79db601
stackdriver: fix tcp bytes metrics aggregation (#3179)
* stackdriver: fix tcp bytes metrics aggregation

* gofmt
2021-02-02 21:39:02 -08:00
Pengyuan Bian 4d6782f636
Add configuration for stackdriver metric expiry. (#3134)
* Set sd metric reporting expiry to 1 hour.

* add configurability

* fix

* update

* add an integration test

* update
2021-01-13 12:19:12 -08:00
Nupur Garg 9efad2bf2b
Add Rbac Access Denied Policy Info in Access logs (#3100)
* Add Rbac Access Denied Policy Info in Access logs

* fix lint error

Signed-off-by: gargnupur <gargnupur@google.com>

* fix based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* fix based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>
2020-11-17 17:53:26 -08:00
Nupur Garg 18e18047cc
Fix useragent in stackdriver access log (#3076)
* Fix useragent in stackdriver access log

Signed-off-by: gargnupur <gargnupur@google.com>

* fix tests
looks like user-agent was just getting ignored in tests before :(

Signed-off-by: gargnupur <gargnupur@google.com>
2020-10-30 08:34:28 -07:00
Nupur Garg 45ef14104a
Add customized access logging support for stackdriver access logs (#3047)
* Add customized access logging support for stackdriver access logs

TODO: add support for removal of tags and customization of TCP access logs

Improve comment

Remove proto refactoring
Enable it for TCP

fix extra semi colon

add cleanupExpressions and cache for TCP

fix test

fix comments

* fix build

* fix comments

* Update doc
2020-10-20 17:59:42 -07:00
Pengyuan Bian 58f07a7722
Parse workload and service from resource labels (#3051)
* update sha

* parse workload and service from resource labels

* add test

* clean up

* fix

* clean up

* skip looking at localhost endpoint

* fix

* fix

* update cluster name
2020-10-15 17:55:12 -07:00
Kuat ddfda5e37a
validate route_name (#3042)
Signed-off-by: Kuat Yessenov <kuat@google.com>
2020-10-14 12:41:20 -07:00
Nupur Garg a5ef9f7daf
Minor changes to Access Logs (#3000)
1) Made batch size and interval for reporting configurable
2) Don't add labels if they are empty-> this is done for labels that are known to empty sometimes
3) Add upstream_transport_failure_reason label to logs

Signed-off-by: gargnupur <gargnupur@google.com>

Added a default timer for ticker

Signed-off-by: gargnupur <gargnupur@google.com>

Fixed feedback

Signed-off-by: gargnupur <gargnupur@google.com>

Updated

Signed-off-by: gargnupur <gargnupur@google.com>
2020-10-08 08:59:47 -07:00
Nupur Garg edb743301a
Add Client Side Sampling Support (#3031) 2020-10-06 15:33:21 -07:00
Pengyuan Bian 4946ec834a
add destination_service_name into sd log (#3026)
* add destination_service_name into sd log

* fix test

* fix test

* fix test
2020-09-30 10:34:12 -07:00
Nupur Garg 06eb99228e
If istio.operationId is present us it Stackdriver metrics (#3008)
Completing mjog's https://github.com/istio/proxy/pull/2832

Signed-off-by: gargnupur <gargnupur@google.com>
2020-09-09 17:20:19 -07:00
Pengyuan Bian a7ef110ba4
Update stackdriver filter to fallback to default mesh id format when not specified (#2993)
* update stackdriver filter to fallback to default mesh id format when not specified

* skip setting mesh id if project number if not known

* fix comment

* fix

* fix

* fix test

* fix test again
2020-08-28 19:11:31 -07:00
David Raskin 40c3904827
Add audit log stream to stackdriver filter (#2970)
* Initial auditEntry implementation

Signed-off-by: davidraskin <draskin@google.com>

* Initial audit log implementation

Signed-off-by: davidraskin <draskin@google.com>

* Format

Signed-off-by: davidraskin <draskin@google.com>

* Use LogEntryType and map for WriteLogEntriesRequest

Signed-off-by: davidraskin <draskin@google.com>

* Add function to initialize logEntriesRequests

Signed-off-by: davidraskin <draskin@google.com>

* Format

Signed-off-by: davidraskin <draskin@google.com>

* Switched to using bool for outbound and bool for audit

Signed-off-by: davidraskin <draskin@google.com>

* Format and remove uneeded functions

Signed-off-by: davidraskin <draskin@google.com>

* Undo stats modification for non cpp20

Signed-off-by: davidraskin <draskin@google.com>

* Takeout double setting of label

Signed-off-by: davidraskin <draskin@google.com>

* Update extensions/common/context.h

Co-authored-by: Nupur Garg <37600866+gargnupur@users.noreply.github.com>

* Update extensions/common/context.h

Co-authored-by: Nupur Garg <37600866+gargnupur@users.noreply.github.com>

* Remove redundant request_info population

Signed-off-by: davidraskin <draskin@google.com>

* Addressed comments

Signed-off-by: davidraskin <draskin@google.com>

* Update comments + change when audit entry is added

Signed-off-by: davidraskin <draskin@google.com>

* Update comments. remove unnecessary include

Signed-off-by: davidraskin <draskin@google.com>

* format

Signed-off-by: davidraskin <draskin@google.com>

* Fix tcp audit logging

Signed-off-by: davidraskin <draskin@google.com>

* Documentation of config

Signed-off-by: davidraskin <draskin@google.com>

* Integration test + address comments

Signed-off-by: davidraskin <draskin@google.com>

* Format

Signed-off-by: davidraskin <draskin@google.com>

* test multiple auditentries + format comment

Signed-off-by: davidraskin <draskin@google.com>

* Remove test case list + add test to inventory

Signed-off-by: davidraskin <draskin@google.com>

Co-authored-by: Nupur Garg <37600866+gargnupur@users.noreply.github.com>
2020-08-20 10:37:12 -07:00
Nupur Garg 3b0c7f243f
Enable Client Side Access Logs for SD (#2955)
* Enable Client Side Access Logs for SD

Fix fmt

Fix fmt

Fix test

Added config options and test for the same

Fixed after rebase

Fixed config and added another test case

Run fmt

Change from ERR_ONLY to ERR_ONLY_ON_NO_MX

Fixed based on feedback

Updated config

Updated config

Fixed based on feedback

* Fixed based on feedback

* Fix lint

* change client error access log
2020-08-11 12:05:47 -07:00
Nupur Garg 41b2e59a43
Set TextPayload for TCP Access Log (#2961)
* Set TextPayload for TCP Access Log and fix source_port showing up as 0 in TCP logs

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback. Also, added a condition for destination in payload that if destination_canonical_service is not found, change to destination_service_name.

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback.

Signed-off-by: gargnupur <gargnupur@google.com>
2020-08-05 10:55:38 -07:00
Nupur Garg 60f5e7928c
Add extra fields in stackdriver access logs to match envoy access logs (#2949)
* Add extra fields in stackdriver access logs to match envoy access logs

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>
2020-07-28 12:34:34 -07:00
Nupur Garg 47d38c13e1
Add TCP Access Log on Open (#2912)
* Add TCP Access Log on Open

Signed-off-by: gargnupur <gargnupur@google.com>

fixed formatting

Signed-off-by: gargnupur <gargnupur@google.com>

Adding to see exact thing in PR for my own review

Signed-off-by: gargnupur <gargnupur@google.com>

Adding to see exact thing in PR for my own review -> fix formatting

Signed-off-by: gargnupur <gargnupur@google.com>

Fix tests

Signed-off-by: gargnupur <gargnupur@google.com>

Fix format

Signed-off-by: gargnupur <gargnupur@google.com>

Fix test

Signed-off-by: gargnupur <gargnupur@google.com>

* make tests parallel

Signed-off-by: gargnupur <gargnupur@google.com>

* fix lint error

Signed-off-by: gargnupur <gargnupur@google.com>

* fix test and based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* Add log_sampled after rebase

Signed-off-by: gargnupur <gargnupur@google.com>

* Log metrics too on timeout

Signed-off-by: gargnupur <gargnupur@google.com>

* Fix based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>
2020-07-20 21:33:29 -07:00
Nupur Garg 5f16bfd2dc
Add filtered label for sampled logs (#2918)
* Add filtered label for sampled logs

Signed-off-by: gargnupur <gargnupur@google.com>

* Fix unit test

Signed-off-by: gargnupur <gargnupur@google.com>

* Fix unit test

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* Fix based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>
2020-07-17 18:54:34 -07:00
Pengyuan Bian c51fe751a1
Fill in unknown for stackdriver metric empty labels (#2910)
* fill in unknown for empty labels

* add comment

* format

* clean
2020-07-16 16:49:54 -07:00
Nupur Garg ea0ce55278
Add TCP Access Logging (#2852)
* Add TCP Metrics in Stackdriver

Signed-off-by: gargnupur <gargnupur@google.com>

fix

Signed-off-by: gargnupur <gargnupur@google.com>

changes

Signed-off-by: gargnupur <gargnupur@google.com>

refactor

Signed-off-by: gargnupur <gargnupur@google.com>

fix test

Add TCP Metrics in Stackdriver

Signed-off-by: gargnupur <gargnupur@google.com>

fix

Signed-off-by: gargnupur <gargnupur@google.com>

Add TCP access logging

changes

Signed-off-by: gargnupur <gargnupur@google.com>

Remove local path from Makefile

changes

Signed-off-by: gargnupur <gargnupur@google.com>

Add functions for queue

fix build

fix test

remove debug time

Signed-off-by: gargnupur <gargnupur@google.com>

remove debug time

Signed-off-by: gargnupur <gargnupur@google.com>

Add protocol in http accesslog

* fix lint

Signed-off-by: gargnupur <gargnupur@google.com>

* fix merge from master

Signed-off-by: gargnupur <gargnupur@google.com>

* fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* fix test

* fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* add comment
2020-06-08 11:56:57 -07:00
Nupur Garg 46babbff42
Add TCP Metrics in Stackdriver (#2843)
* Add TCP Metrics in Stackdriver

Signed-off-by: gargnupur <gargnupur@google.com>

fix

Signed-off-by: gargnupur <gargnupur@google.com>

changes

Signed-off-by: gargnupur <gargnupur@google.com>

refactor

Signed-off-by: gargnupur <gargnupur@google.com>

fix test

Fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* Fix yaml files

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* Fixed based on feedback

Signed-off-by: gargnupur <gargnupur@google.com>

* Set timer always

Signed-off-by: gargnupur <gargnupur@google.com>

* remove access logger for TCP

Signed-off-by: gargnupur <gargnupur@google.com>
2020-06-04 10:15:56 -07:00
Douglas Reid 553cd42ba5
fix(stackdriver): improve uids for GCE VMs (#2854)
* fix(stackdriver): improve uids for GCE VMs

* remove nested if
2020-05-18 18:51:18 -07:00
Douglas Reid d4d37ea788
feat(stackdriver): derive owners from platform_meta for gce instances (#2816)
* feat(stackdriver): derive owners from platform_meta for gce instances

* add tests

* review changes
2020-04-22 15:36:02 -07:00
Douglas Reid 9cda1af77e
feat(stackdriver): add canonical service info to logs (#2818)
* feat(stackdriver): add canonical service info to logs

* fix gateway logs

* fix gateway test

* use consts
2020-04-21 14:59:19 -07:00
Douglas Reid 770f866dd4
feat(edges): add support for canonical service labels (#2804)
* feat(edges): add support for canonical service labels in WorkloadInstance

* run clang-format

* update generated file

* clang-format

* fix go.mod

* convert to constexpr

* add missing test tmpl change
2020-04-21 11:17:11 -07:00
Pengyuan Bian 7771aefa2a
Consolidate proxy tests to use step based framework (#2806)
* consolidate proxy tests to use step based framework

* lint

* extend latency boundary for asan tsan build

* sleep one sec before sending request in access log test

* prolong export period for stackdriver test to bear asan/tsan initial loading time

* address comment

* sleep a bit after envoy starting up
2020-04-16 18:04:24 -07:00
Douglas Reid d1f6f0e883
feat(stackdriver): use app container for k8s_container when appropriate (#2795)
* feat(stackdriver): use app container for k8s_container when appropriate

* fix container for gateway test

* adjust method signature

* Revert "adjust method signature"

This reverts commit bd09113e4c.
2020-04-08 09:53:27 -07:00
Douglas Reid 1ce1cdfb53
feat(stackdriver): support canonical service labels (#2692)
* feat(stackdriver): support canonical service labels

Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com>

* address review comment

Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com>

* fix logic

Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com>
2020-02-20 20:37:50 -08:00
Pengyuan Bian 90d5f8dde3 Add extra labels to sd logging (#2625)
* add extra fields into request info

* add logic to export extended request info

* add initial value

* update wasm file

* address comment

* fix
2020-01-16 09:46:52 -08:00
Pengyuan Bian 5a66e29530 Extract service name from request host and cluster name (#2548)
* support extracing service name from request host

* service_name:port

* s/namespace_pos/name_pos

* update

* lint

* add initialization to service auth policy

* format

* use absl time

* update test

* address comment
2019-12-14 00:24:47 -08:00
Kuat c5b7d34188 validate single proxy metadata exchange and stack driver (#2515)
* validate single proxy metadata exchange and stack driver

Signed-off-by: Kuat Yessenov <kuat@google.com>

* fix a test

Signed-off-by: Kuat Yessenov <kuat@google.com>
2019-11-08 20:16:52 -08:00
Pengyuan Bian c3fda9c3a8 Fill response flag for stats plugin (#2527)
* add response flag

* update stats plugin

* comment and format

* response flag

* license
2019-11-07 10:57:52 -08:00
Douglas Reid 26de3f209a fix(edges): use service name (instead of host) in edge reporting (#2521)
* fix(edges): use destination service name instead of host for edges

Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com>

* fix(edges): use destination service name instead of host for edges

Signed-off-by: Douglas Reid <douglas-reid@users.noreply.github.com>
2019-11-05 10:44:45 -08:00
Pengyuan Bian a1d412099f Use destination service name in stackdriver metric label (#2502)
* use destination service name in stackdriver metric label

* add todo

* fix merge mistake
2019-11-01 11:22:03 -07:00
Kuat 6a8fc0d5dd test: add TLS SD validation (#2503)
* basic TLS test

Signed-off-by: Kuat Yessenov <kuat@google.com>

* basic TLS test

Signed-off-by: Kuat Yessenov <kuat@google.com>

* fix a unit test

Signed-off-by: Kuat Yessenov <kuat@google.com>

* add mTLS certs

Signed-off-by: Kuat Yessenov <kuat@google.com>

* add principals

Signed-off-by: Kuat Yessenov <kuat@google.com>
2019-11-01 02:32:04 -07:00