Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
51803: cmd/docgen: add HTTP extractor r=mjibson a=mjibson

Add a way to extract docs from the status.proto HTTP endpoint. These
can be imported into the docs project as needed.

Release note: None

52083: roachtest: small misc r=andreimatei a=andreimatei

See individual commits.

52094: rpc: implement tenant access control policies at KV RPC boundary r=nvanbenschoten a=nvanbenschoten

Fixes #47898.

Rebased on #51503 and #52034. Ignore all but the last 3 commits.

This commit adds a collection of access control policies for the newly exposed tenant RPC server. These authorization policies ensure that an authenticated tenant is only able to access keys within its keyspace and that no tenant is able to access data from another tenant's keyspace through the tenant RPC server. This is a major step in providing crypto-backed logical isolation between tenants in a multi-tenant cluster.

The existing auth mechanism is retained on the standard RPC server, which means that the system tenant is still able to access any key in the system.

52352: sql/pgwire: add regression test for varchar OIDs in RowDescription r=jordanlewis a=rafiss

See issue #51360. The bug described in it was fixed somewhat
accidentally, so this test will verify that we don't regress again.

Release note: None

52386: opt: add SerializingProject exec primitive r=RaduBerinde a=RaduBerinde

The top-level projection of a query has a special property - it can project away
columns that we want an ordering on (e.g. `SELECT a FROM t ORDER BY b`).

The distsql physical planner was designed to tolerate such cases, as they were
much more common with the heuristic planner. But the new distsql exec factory
does not; it currently relies on a hack: it detects this case by checking if the
required output ordering is `nil`. This is fragile and doesn't work in all
cases.

This change adds a `SerializingProject` primitive which is like a SimpleProject
but it forces serialization of all parallel streams into one. The new primitive
is used to enforce the final query presentation. We only need to pass column
names for the presentation, so we remove `RenameColumns` and remove the column
names argument from `SimpleProject` (simplifying some execbuilder code).

We also fix a bug in `ConstructSimpleProject` where we weren't taking the
`PlanToStreamColMap` into account when building the projection.

Release note: None

Co-authored-by: Matt Jibson <[email protected]>
Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
  • Loading branch information
6 people committed Aug 5, 2020
6 parents 1cbbf7d + 597f1ac + f38ebe1 + 44983c4 + b960095 + 509b76d commit 67a92cd
Show file tree
Hide file tree
Showing 37 changed files with 3,537 additions and 236 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ bin/.bootstrap: $(GITHOOKS) | bin/.submodules-initialized
github.com/mattn/goveralls \
github.com/mibk/dupl \
github.com/mmatczuk/go_generics/cmd/go_generics \
github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc \
github.com/wadey/gocovmerge \
golang.org/x/lint/golint \
golang.org/x/perf/cmd/benchstat \
Expand Down Expand Up @@ -850,7 +851,7 @@ SQLPARSER_TARGETS = \

PROTOBUF_TARGETS := bin/.go_protobuf_sources bin/.gw_protobuf_sources bin/.cpp_protobuf_sources bin/.cpp_ccl_protobuf_sources

DOCGEN_TARGETS := bin/.docgen_bnfs bin/.docgen_functions docs/generated/redact_safe.md
DOCGEN_TARGETS := bin/.docgen_bnfs bin/.docgen_functions docs/generated/redact_safe.md bin/.docgen_http

EXECGEN_TARGETS = \
pkg/col/coldata/vec.eg.go \
Expand Down Expand Up @@ -1557,6 +1558,14 @@ bin/.docgen_functions: bin/docgen
docgen functions docs/generated/sql --quiet
touch $@

bin/.docgen_http: bin/docgen $(PROTOC)
docgen http \
--protoc $(PROTOC) \
--gendoc ./bin/protoc-gen-doc \
--out docs/generated/http \
--protobuf pkg:$(GOGO_PROTOBUF_PATH):$(PROTOBUF_PATH):$(COREOS_PATH):$(GRPC_GATEWAY_GOOGLEAPIS_PATH):$(ERRORS_PATH)
touch $@

.PHONY: docs/generated/redact_safe.md

docs/generated/redact_safe.md:
Expand Down
Loading

0 comments on commit 67a92cd

Please sign in to comment.