-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[identity] Update to include subclusters, user IDs, deployments
We want to be able to track when an identity token comes from a particular subcluster or deployment. This change adds that functionality.
- Loading branch information
Showing
9 changed files
with
286 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Upgrade protobufs | ||
|
||
In order to upgrade the protobuf definitions, the following script can be used. | ||
|
||
```shell | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
GOVAL_DIR="${GOVAL_DIR:-${HOME}/goval}" | ||
WORK_DIR="$(mktemp -d)" | ||
|
||
function cleanup { | ||
rm -rf "${WORK_DIR}" | ||
} | ||
trap cleanup EXIT | ||
|
||
# Download the latest protobuf binaries. | ||
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v24.2/protoc-24.2-linux-x86_64.zip -o "${WORK_DIR}/protoc.zip" | ||
(cd "${WORK_DIR}" && unzip protoc.zip) | ||
mkdir -p "${WORK_DIR}/replit/goval" | ||
|
||
rsync \ | ||
-Lazr \ | ||
--exclude='api/npm' \ | ||
--include='*/' \ | ||
--include='*.proto' \ | ||
--exclude='*' \ | ||
"${GOVAL_DIR}/api" \ | ||
"${WORK_DIR}/replit/goval" | ||
find "${WORK_DIR}" -name '*.proto' | xargs sed -i 's@import "api/@import "replit/goval/api/@g' | ||
"${WORK_DIR}/bin/protoc" \ | ||
-I="${WORK_DIR}" \ | ||
--python_out=src/ \ | ||
"${WORK_DIR}/replit/goval/api/signing.proto" \ | ||
"${WORK_DIR}/replit/goval/api/client.proto" \ | ||
"${WORK_DIR}/replit/goval/api/repl/repl.proto" \ | ||
"${WORK_DIR}/replit/goval/api/features/features.proto" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.