Commit Graph

24910 Commits

Author SHA1 Message Date
Tim Gross bebed09677 GHA pinning updates (#18093)
Trusted Supply Chain Component Registry (TSCCR) enforcement starts Monday and an
internal report shows our semgrep action is pinned to a version that's not
currently permitted. Update all the action versions to whatever's the new
hotness to maximum the time-to-live on these until we have automated pinning
setup.

Also version bumps our chromedriver action, which randomly broke upstream today.
2023-07-28 11:52:42 -04:00
hc-github-team-nomad-core 34ac0e5aad
cli: add help message for `-consul-namespace` (#18081) (#18091)
Add missing help entry for the `-consul-namespace` flag in `nomad job
run`.
2023-07-28 10:34:44 -04:00
hc-github-team-nomad-core 77d1f188c6
backport of commit 1e73a8a6991214fb57afa37de425dd7b0e765623 (#18089)
This pull request was automerged via backport-assistant
2023-07-28 02:49:50 -05:00
James Rasell b8cb1e79a3
chore(lint): use Go stdlib variables for HTTP methods and status codes (#17968) (#18074)
Co-authored-by: Ville Vesilehto <ville@vesilehto.fi>
2023-07-26 16:38:39 +01:00
hc-github-team-nomad-core cf18df8eb4
backport of commit 14102979762cc48183cd70dc91e26c08f630ab9d (#18067)
This pull request was automerged via backport-assistant
2023-07-26 08:30:35 -05:00
hc-github-team-nomad-core b4c4dcb818
backport of commit b7d14f133c69a64e39c40417705d29b6f2b96f60 (#18065)
This pull request was automerged via backport-assistant
2023-07-26 08:23:49 -05:00
hc-github-team-nomad-core 1604894653
backport of commit 855dc2a41947e8843a8ee6bcae6b9b1533919126 (#18059)
This pull request was automerged via backport-assistant
2023-07-25 07:04:48 -05:00
hc-github-team-nomad-core 51b8993180
backport of commit 67e5b084a1ea525cc5a2b93c2f0ed890d1af0ce3 (#18052)
This pull request was automerged via backport-assistant
2023-07-24 15:00:43 -05:00
hc-github-team-nomad-core 04a95ef5c7
backport of commit 6219ebc93dbf575015fa2921eee13daaff2b1d5e (#18049)
This pull request was automerged via backport-assistant
2023-07-24 10:33:18 -05:00
hc-github-team-nomad-core 24282f5598
backport of commit 22984929ce232de50c3f7d0754e4a515fb53e01b (#18047)
This pull request was automerged via backport-assistant
2023-07-24 10:13:52 -05:00
hc-github-team-nomad-core 0400ec6df4
backport of commit 8cabda5ec5c1d0dd3290ece4789cd8fea1ca3f5c (#18043)
This pull request was automerged via backport-assistant
2023-07-24 04:44:15 -05:00
James Rasell 40549e1132
check in stderrFrame is nil before logging stderrFrame.Data (#17815) (#18041)
Co-authored-by: Kevin Mulvey <kmulvey@linux.com>
2023-07-24 10:32:10 +01:00
hc-github-team-nomad-core 4f087674f4
backport of commit 7fe432042eaa0a97c0aaa40d302055eb18e8a9b0 (#18040)
This pull request was automerged via backport-assistant
2023-07-24 02:28:28 -05:00
hc-github-team-nomad-core 02c2f1a50f
Backport of Retain task states for post stop tasks at the time of node GC into release/1.6.x (#18033)
This pull request was automerged via backport-assistant
2023-07-21 12:55:29 -05:00
Tim Gross 95e71a82a4 Merge branch 'release/1.6.1' into release/1.6.x 2023-07-21 11:12:06 -04:00
hc-github-team-nomad-core b807b5d967 Prepare for next release 2023-07-21 13:49:46 +00:00
hc-github-team-nomad-core 88ea0c3cc2 Generate files for 1.6.1 release 2023-07-21 13:49:42 +00:00
hc-github-team-nomad-core 7eb6d42cb5
backport of commit 80244bb7914876278597b205324f990cbe9ee15d (#18027)
This pull request was automerged via backport-assistant
2023-07-21 08:21:21 -05:00
Luiz Aoqui 21cf30178a ui: handle errors from unimplemented services (#18020)
When a request is made to an RPC service that doesn't exist (for
example, a cross-region request from a newer version of Nomad to an
older version that doesn't implement the endpoint) the application
should return an empty list as well.
2023-07-21 09:20:00 -04:00
hc-github-team-nomad-core 63316363c9
Backport of ui: handle node pool requests to older regions into release/1.6.x (#18024)
This pull request was automerged via backport-assistant
2023-07-21 08:17:08 -05:00
hc-github-team-nomad-core 30260f06e8
Backport of state: canonicalize namespace on restore into release/1.6.x (#18018)
This pull request was automerged via backport-assistant
2023-07-20 15:05:16 -05:00
hc-github-team-nomad-core e891026755
Backport of CSI: improve controller RPC reliability into release/1.6.x (#18015)
This pull request was automerged via backport-assistant
2023-07-20 13:52:27 -05:00
hc-github-team-nomad-core 180ea2df9c
backport of commit ddd74c051a4f02a2ace43abd6e0617b8ea3c1192 (#18012)
This pull request was automerged via backport-assistant
2023-07-20 13:16:53 -05:00
hc-github-team-nomad-core 36163c36f8
backport of commit 6e4603e8ba503cd08279f50da1a4c0a5539a9768 (#18011)
This pull request was automerged via backport-assistant
2023-07-20 13:16:34 -05:00
hc-github-team-nomad-core d3b1d58c4d
backport of commit 715764bfe448fc6a80ca3858377b4f760d39c611 (#18010)
This pull request was automerged via backport-assistant
2023-07-20 11:38:52 -05:00
hc-github-team-nomad-core 963b2d97b2
Backport of [ui] When a purged/404-ing job is detected, boot the user out of that job and back to the index into release/1.6.x (#18009)
This pull request was automerged via backport-assistant
2023-07-20 11:37:06 -05:00
hc-github-team-nomad-core b1bfb59394
Backport of metrics: report task memory_max value into release/1.6.x (#18004)
This pull request was automerged via backport-assistant
2023-07-19 15:50:34 -05:00
hc-github-team-nomad-core b7689e87ec
Backport of nsd: retain query params in HTTP health checks into release/1.6.x (#18003)
This pull request was automerged via backport-assistant
2023-07-19 15:47:02 -05:00
hc-github-team-nomad-core 642cad50d8
Backport of ui: fix Topology node state filter into release/1.6.x (#18000)
This pull request was automerged via backport-assistant
2023-07-19 15:38:55 -05:00
hc-github-team-nomad-core 3011314f23
Backport of volume-status : show namespace the volume belongs to into release/1.6.x (#17997)
This pull request was automerged via backport-assistant
2023-07-19 15:37:18 -05:00
hc-github-team-nomad-core e5fb6fe687
backport of commit 615e76ef3c23497f768ebd175f0c624d32aeece8 (#17993)
This pull request was automerged via backport-assistant
2023-07-19 13:31:14 -05:00
hc-github-team-nomad-core 872db79967
Backport of updating to specify mTLS rpc endpoints into release/1.6.x (#17990)
This pull request was automerged via backport-assistant
2023-07-19 13:17:10 -05:00
Luiz Aoqui 7ddb4b3075 Merge branch 'release/1.6.0' into release/1.6.x 2023-07-19 10:47:46 -04:00
hc-github-team-nomad-core 96934ce453
backport of commit dd0bdb1e0dff2e796ad7f0418e9128fe7d864362 (#17985)
This pull request was automerged via backport-assistant
2023-07-19 09:35:46 -05:00
hc-github-team-nomad-core 46db1e76cb
backport of commit d6138ebd085573a040a9490f8592854f862dfa14 (#17982)
This pull request was automerged via backport-assistant
2023-07-19 09:21:47 -05:00
hc-github-team-nomad-core bff3663626
backport of commit bed29bf02f9ca01d615716bc0edab523717b79b3 (#17979)
This pull request was automerged via backport-assistant
2023-07-19 09:16:55 -05:00
hc-github-team-nomad-core c67a225882 Prepare for next release 2023-07-18 18:51:15 +00:00
hc-github-team-nomad-core 609a97cfab Generate files for 1.6.0 release 2023-07-18 18:51:11 +00:00
Tim Gross e8bfef8148 search: fix ACL filtering for plugins and variables
ACL permissions for the search endpoints are done in three passes. The
first (the `sufficientSearchPerms` method) is for performance and coarsely
rejects requests based on the passed-in context parameter if the user has no
permissions to any object in that context. The second (the
`filteredSearchContexts` method) filters out contexts based on whether the user
has permissions either to the requested namespace or again by context (to catch
the "all" context). Finally, when iterating over the objects available, we do
the usual filtering in the iterator.

Internal testing found several bugs in this filtering:
* CSI plugins can be searched by any authenticated user.
* Variables can be searched if the user has `job:read` permissions to the
  variable's namespace instead of `variable:list`.
* Variables cannot be searched by wildcard namespace.

This is an information leak of the plugin names and variable paths, which we
don't consider to be privileged information but intended to protect anyways.

This changeset fixes these bugs by ensuring CSI plugins are filtered in the 1st
and 2nd pass ACL filters, and changes variables to check `variable:list` in the
2nd pass filter unless the wildcard namespace is passed (at which point we'll
fallback to filtering in the iterator).

Fixes: CVE-2023-3300
Fixes: #17906
2023-07-18 12:09:55 -04:00
Luiz Aoqui ac90c6f008 acl: fix parsing of policies with blocks w/o label
An ACL policy with a block without label generates unexpected results.
For example, a policy such as this:

```
namespace {
  policy = "read"
}
```

Is applied to a namespace called `policy` instead of the documented
behaviour of applying it to the `default` namespace.

This happens because of the way HCL1 decodes blocks. Since it doesn't
know if a block is expected to have a label it applies the `key` tag to
the content of the block and, in the example above, the first key is
`policy`, so it sets that as the `namespace` block label.

Since this happens internally in the HCL decoder it's not possible to
detect the problem externally.

Fixing the problem inside the decoder is challenging because the JSON
and HCL parsers generate different ASTs that makes impossible to
differentiate between a JSON tree from an invalid HCL tree within the
decoder.

The fix in this commit consists of manually parsing the policy after
decoding to clear labels that were not set in the file. This allows the
validation rules to consistently catch and return any errors, no matter
if the policy is an invalid HCL or JSON.
2023-07-18 12:09:37 -04:00
Charlie Voiselle 58234bc243 redact token before passing to sentinel 2023-07-18 12:08:57 -04:00
hc-github-team-nomad-core c9ef870f96
backport of commit a9eecb457cef34ee856681a51af94fe0f6db4b21 (#17947)
This pull request was automerged via backport-assistant
2023-07-14 04:23:26 -05:00
hc-github-team-nomad-core 2f7892667f
backport of commit b75f9bd459700112cb31a329dc54ddeba46d749e (#17942)
This pull request was automerged via backport-assistant
2023-07-13 17:26:01 -05:00
hc-github-team-nomad-core 90a4579208
backport of commit 25a062650f38b682733fe51d886188a8d0504844 (#17922)
This pull request was automerged via backport-assistant
2023-07-12 10:17:45 -05:00
hc-github-team-nomad-core 9e31dec7ca
Backport of docs: add plugin docs for pledge task driver into release/1.6.x (#17919)
This pull request was automerged via backport-assistant
2023-07-12 10:16:57 -05:00
hc-github-team-nomad-core 048ca39403
backport of commit 0cb728ed68165888245cf8bc72e4dece5123ef4f (#17918)
This pull request was automerged via backport-assistant
2023-07-12 09:52:00 -05:00
Tim Gross 281f6e482e Merge branch 'release/1.6.0-rc.1' into release/1.6.x 2023-07-12 09:55:24 -04:00
hc-github-team-nomad-core 51eb8284c7
backport of commit 3d5bce76d00dff29c42c37bb20e38e4bf1d2187d (#17904)
This pull request was automerged via backport-assistant
2023-07-11 12:53:51 -05:00
hc-github-team-nomad-core df7bcf3ebc Prepare for next release 2023-07-11 15:19:58 +00:00
hc-github-team-nomad-core 1a1e1d5d4d Generate files for 1.6.0-rc.1 release 2023-07-11 15:19:54 +00:00