open-nomad/nomad/structs
Tim Gross e0fddee386
Pre forwarding authentication (#15417)
Upcoming work to instrument the rate of RPC requests by consumer (and eventually
rate limit) require that we authenticate a RPC request before forwarding. Add a
new top-level `Authenticate` method to the server and have it return an
`AuthenticatedIdentity` struct. RPC handlers will use the relevant fields of
this identity for performing authorization.

This changeset includes:
* The main implementation of `Authenticate`
* Provide a new RPC `ACL.WhoAmI` for debugging authentication. This endpoint
  returns the same `AuthenticatedIdentity` that will be used by RPC handlers. At
  some point we might want to give this an equivalent HTTP endpoint but I didn't
  want to add that to our public API until some of the other Workload Identity
  work is solidified, especially if we don't need it yet.
* A full coverage test of the `Authenticate` method. This sets up two server
  nodes with mTLS and ACLs, some tokens, and some allocations with workload
  identities.
* Wire up an example of using `Authenticate` in the `Namespace.Upsert` RPC and
  see how authorization happens after forwarding.
* A new semgrep rule for `Authenticate`, which we'll need to update once we're
  ready to wire up more RPC endpoints with authorization steps.
2022-12-06 14:44:03 -05:00
..
config cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
acl.go Pre forwarding authentication (#15417) 2022-12-06 14:44:03 -05:00
acl_test.go acl: added type to ACL Auth Method stub (#15480) 2022-12-06 14:47:05 +01:00
alloc.go Add Namespace, Job and Group to envoy stats (#14311) 2022-09-22 10:38:21 -04:00
alloc_test.go client: fixed a problem calculating a service namespace. (#13493) 2022-06-28 09:47:28 +02:00
autopilot.go migrate autopilot implementation to raft-autopilot (#14441) 2022-09-01 14:27:10 -04:00
batch_future.go
batch_future_test.go
bitmap.go
bitmap_test.go
check_test.go cleanup: use constants for on_update values 2022-07-21 13:09:47 -05:00
checks.go cleanup: use constants for on_update values 2022-07-21 13:09:47 -05:00
connect.go
connect_test.go
consul.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
consul_oss.go
consul_oss_test.go
consul_test.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
csi.go cleanup more helper updates (#14638) 2022-09-21 14:53:25 -05:00
csi_test.go
devices.go scheduler: stopped-yet-running allocs are still running (#10446) 2022-09-13 12:52:47 -07:00
devices_test.go scheduler: stopped-yet-running allocs are still running (#10446) 2022-09-13 12:52:47 -07:00
diff.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
diff_test.go template: error on missing key (#15141) 2022-11-04 13:23:01 -04:00
encoding.go
errors.go Pre forwarding authentication (#15417) 2022-12-06 14:44:03 -05:00
errors_test.go
eval.go eval delete: move batching of deletes into RPC handler and state (#15117) 2022-11-14 14:08:13 -05:00
event.go acl: sso auth method event stream (#15280) 2022-11-21 10:06:05 +01:00
extensions.go keyring: wrap root key in key encryption key (#14388) 2022-08-30 10:59:25 -04:00
funcs.go cleanup more helper updates (#14638) 2022-09-21 14:53:25 -05:00
funcs_test.go scheduler: stopped-yet-running allocs are still running (#10446) 2022-09-13 12:52:47 -07:00
generate.sh workload identity (#13223) 2022-07-11 13:34:05 -04:00
handlers.go
job.go servicedisco: implicit constraint for nomad v1.4 when using nsd checks (#14868) 2022-10-11 08:21:42 -05:00
job_test.go servicedisco: implicit constraint for nomad v1.4 when using nsd checks (#14868) 2022-10-11 08:21:42 -05:00
keyring.go keyring: safely handle missing keys and restore GC (#15092) 2022-11-01 15:00:50 -04:00
network.go cleanup more helper updates (#14638) 2022-09-21 14:53:25 -05:00
network_test.go scheduler: stopped-yet-running allocs are still running (#10446) 2022-09-13 12:52:47 -07:00
node.go cleanup more helper updates (#14638) 2022-09-21 14:53:25 -05:00
node_class.go
node_class_test.go build: run gofmt on all go source files 2022-08-16 11:14:11 -05:00
node_test.go
operator.go client: fix data races in config handling (#14139) 2022-08-18 16:32:04 -07:00
search.go rename SecureVariables to Variables throughout 2022-08-26 16:06:24 -04:00
service_identities.go
service_registration.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
service_registration_test.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
services.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
services_test.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
streaming_rpc.go
structs.go Pre forwarding authentication (#15417) 2022-12-06 14:44:03 -05:00
structs_codegen.go
structs_oss.go
structs_periodic_test.go build: run gofmt on all go source files 2022-08-16 11:14:11 -05:00
structs_test.go acl: sso auth method RPC endpoints (#15221) 2022-11-21 10:15:39 +01:00
testing.go
uuid.go core: allow deleting of evaluations (#13492) 2022-07-06 16:30:11 +02:00
variables.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
variables_test.go cleanup: rename Equals to Equal for consistency (#14759) 2022-10-10 09:28:46 -05:00
vault.go
volume_test.go
volumes.go