-
Notifications
You must be signed in to change notification settings - Fork 58
fix: add Elasticsearch visibility and modernize TLS samples #147
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
base: main
Are you sure you want to change the base?
Changes from all commits
3d5d65f
7a08606
35b6859
63a3f63
524d55c
6a8b928
cec401c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,26 +32,37 @@ cluster-internode | | | | |
| ./generate-certs.sh | ||
| ``` | ||
|
|
||
| 2. Start Temporal with `start-temporal.sh`. This will bring up a Temporal cluster (via `docker-compose`) with the `certs` subdirectory mounted as a volume and Temporal configured to use the test certificates in it to secure network communications. | ||
| 2. Start Temporal with `start-temporal.sh`. This will bring up a Temporal cluster (via `docker compose`) with the `certs` subdirectory mounted as a volume and Temporal configured to use the test certificates in it to secure network communications. | ||
|
|
||
| ```bash | ||
| ./start-temporal.sh | ||
| ``` | ||
|
|
||
| 3. You can use docker to enter the cli containers and use `tctl` like this (in another terminal): | ||
| 3. You can use docker to enter the cli containers and use the `temporal` CLI like this (in another terminal): | ||
|
|
||
| ```bash | ||
| docker exec -it tls-full-temporal-cli-admin-1 bash | ||
| docker exec -it tls-full-temporal-cli-development-1 bash | ||
| docker exec -it tls-full-temporal-cli-accounting-1 bash | ||
| docker compose exec temporal-cli-admin bash | ||
| docker compose exec temporal-cli-development bash | ||
| docker compose exec temporal-cli-accounting bash | ||
| ``` | ||
|
|
||
| Environment variables are set up to provide the `development` and `accounting` containers with access to namespaces with the respective names. | ||
| (You'll have to create them first with `tctl namespace register`.) | ||
| The `default` namespace is created automatically on startup. | ||
|
|
||
| 4. But you might notice that all three containers actually have identical (full admin-level) permissions! | ||
| That's because there's no ClaimMapper or Authorizer actually examining the client certs to determine permissions. | ||
| To actually enforce namespace access, you'll have to build the server with a custom ClaimMapper, and turn on the default Authorizer also. | ||
| You can look in [tlsClaimMapper.go](./tlsClaimMapper.go) for an example that will work with the certs in this sample, | ||
| and in [the authorizer sample](../../extensibility/authorizer/) for more instructions on how to build a custom server. | ||
|
|
||
| ### Custom config template | ||
|
|
||
| This sample uses a custom `config_template.yaml` to configure per-namespace TLS host overrides. The file is a Go template rendered by the Temporal server using [sprig](https://masterminds.github.io/sprig/) functions. | ||
|
|
||
| To enable template rendering, the file must contain `# enable-template` in the first 1KB. It is loaded via the `TEMPORAL_SERVER_CONFIG_FILE_PATH` environment variable. | ||
|
|
||
| To preview the rendered config inside the container: | ||
|
|
||
| ```bash | ||
| docker compose exec temporal temporal-server --config-file /etc/temporal/config/config_template.yaml render-config | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't get this to run successfully as-is, the server came up but render-config wasn't working. From poking around with Claude and validating myself: the legacy loader is getting called, and doesn't use the --config-file directive so it's only looking for base.yaml, env.yaml, or env_az.yaml from what I can tell: temporal:loader.go. This probably should be a fix to respect --config-file in render-config, but for now this could be side-stepped by having the config_template.yaml mount at development.yaml in the docker-compose? |
||
| ``` | ||
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.
Any value in still mentioning
temporal operator namespace create -n <namespace>to provide the info of the deleted line?