Commit Graph

89 Commits

Author SHA1 Message Date
Josh Soref
e61207ee2b spelling: convenience 2018-03-11 17:50:48 +00:00
Alex Dadgar
4abacc52cd Show HTTP request method 2018-02-16 15:55:26 -08:00
Kyle Havlovitz
078c7d9aa9 Fix remaining issues with autopilot change 2018-01-30 15:21:28 -08:00
Chelsea Komlo
9d006ecd0d Merge pull request #3492 from hashicorp/f-client-tls-reload
Client/Server TLS dynamic reload
2018-01-23 05:51:32 -05:00
Kyle Havlovitz
4e9735d69f Merge branch 'master' into autopilot 2018-01-18 13:29:25 -08:00
Michael Schurter
ae61f7308d Fix HTTP code for permission denied errors
Fixes #3697

The existing code and test case only covered the leader behavior. When
querying against non-leaders the error has an "rpc error: " prefix.

To provide consistency in HTTP error response I also strip the "rpc
error: " prefix for 403 responses as they offer no beneficial additional
information (and in theory disclose a tiny bit of data to unauthorized
users, but it would be a pretty weird bit of data to use in a malicious
way).
2018-01-09 15:25:53 -08:00
Chelsea Holland Komlo
359358d240 code review fixups 2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
7b749579a2 add ability to upgrade/downgrade nomad agents tls configurations via sighup 2018-01-08 09:21:06 -05:00
Kyle Havlovitz
c2d0c11f9e Add autopilot functionality based on Consul's autopilot 2017-12-18 14:29:41 -08:00
Michael Lange
2926920f26 Add CORS headers to client fs endpoints 2017-11-21 11:22:42 -08:00
Chelsea Komlo
fa9fd4422c Nomad agent reload TLS configuration on SIGHUP (#3479)
* Allow server TLS configuration to be reloaded via SIGHUP

* dynamic tls reloading for nomad agents

* code cleanup and refactoring

* ensure keyloader is initialized, add comments

* allow downgrading from TLS

* initalize keyloader if necessary

* integration test for tls reload

* fix up test to assert success on reloaded TLS configuration

* failure in loading a new TLS config should remain at current

Reload only the config if agent is already using TLS

* reload agent configuration before specific server/client

lock keyloader before loading/caching a new certificate

* introduce a get-or-set method for keyloader

* fixups from code review

* fix up linting errors

* fixups from code review

* add lock for config updates; improve copy of tls config

* GetCertificate only reloads certificates dynamically for the server

* config updates/copies should be on agent

* improve http integration test

* simplify agent reloading storing a local copy of config

* reuse the same keyloader when reloading

* Test that server and client get reloaded but keep keyloader

* Keyloader exposes GetClientCertificate as well for outgoing connections

* Fix spelling

* correct changelog style
2017-11-14 17:53:23 -08:00
Michael Lange
2c04edfd59 Remove the connect-src self restriction for the UI 2017-11-10 13:28:11 -08:00
Alex Dadgar
53dbc4f127 remove atlas 2017-11-02 11:27:21 -07:00
Michael Schurter
e5599deee4 Support CORS for client endpoints
Added to /v1/client/stats and /v1/client/allocation/
2017-10-18 17:32:36 -07:00
Michael Schurter
71178c97a6 Agent Health Endpoint 2017-10-13 15:37:44 -07:00
Michael Schurter
3ed3d1b925 Merge pull request #3374 from hashicorp/f-auth-token
SecretID -> AuthToken
2017-10-12 16:57:49 -07:00
Alex Dadgar
f1965d6305 Handle invalid token as well 2017-10-12 15:39:05 -07:00
Michael Schurter
fae8e7f699 SecretID -> AuthToken 2017-10-12 15:16:33 -07:00
Alex Dadgar
21c2ba33e5 403 instead of 500 for permission denied 2017-10-12 14:10:20 -07:00
Alex Dadgar
a66f32ea58 always gzip 2017-09-19 10:37:49 -05:00
Alex Dadgar
ddc2efa4ac sync 2017-09-19 10:08:23 -05:00
Chelsea Holland Komlo
03b24df193 refactoring prometheus endpoint 2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
815b23fe06 add endpoint for prometheus 2017-09-13 19:21:21 +00:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Chelsea Holland Komlo
4085560503 add http endpoint for in memory metrics
prevent against flaky test due to timing/initialization issues
2017-09-06 13:51:19 +00:00
Armon Dadgar
9c21e76c1e agent: fix routing for token-specific request 2017-09-04 13:07:44 -07:00
Armon Dadgar
b253ad5cfb agent: thread through token for ACL endpoint tests 2017-09-04 13:05:53 -07:00
Armon Dadgar
79420d78cf agent: Adding X-Nomad-Token header parsing 2017-09-04 13:05:53 -07:00
Armon Dadgar
d7f3b896cd nomad: adding ACL bootstrapping endpoint 2017-09-04 13:05:53 -07:00
Armon Dadgar
70cdccf643 agent: Adding HTTP endpoints for ACL tokens 2017-09-04 13:04:45 -07:00
Armon Dadgar
6c6e85ef82 agent: Adding ACL Policy endpoints 2017-09-04 13:03:15 -07:00
Chelsea Holland Komlo
9e3be518e3 adds any resource autocomplete
defaults to listing jobs if no id is provided
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
7c5ef641c1 change endpoint to /v1/search 2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
787f7bc0c4 rename to cluster search
comment updates
2017-08-14 17:36:14 +00:00
Chelsea Holland Komlo
b2df34cf18 further refactoring 2017-08-04 22:50:41 +00:00
Chelsea Holland Komlo
1b24ae599e Retrieve job information for resources endpoint
requires further refactoring and logic for more contexts
2017-08-04 14:34:25 +00:00
Alex Dadgar
873587381d New test agent 2017-07-19 22:14:36 -07:00
Alex Dadgar
31daf93779 HTTP Endpoints 2017-07-07 12:03:11 -07:00
Alex Dadgar
e47be9f771 Merge branch 'master' into f-bolt-db 2017-05-09 11:11:55 -07:00
Alex Dadgar
5aa6e18807 Use batching 2017-05-01 14:50:34 -07:00
Alex Dadgar
9def7e1a14 Don't deepcopy job when retrieving copy of Alloc
This PR removes deepcopying of the job attached to the allocation in the
alloc runner. This operation is called very often so removing reflect
from the code path and the potentially large number of mallocs need to
create a job reduced memory and cpu pressure.
2017-05-01 14:50:34 -07:00
Pete Wildsmith
36f595480e address feedback 2017-04-29 08:26:12 +01:00
Pete Wildsmith
a4ad6eb319 reduce to one configuration option
There should be just one option, verify_https_client, which
controls incoming and outgoing validation for the HTTPS wrapper
2017-04-28 10:45:09 +01:00
Pete Wildsmith
44a91c395f Copy TLSConfig verification flags in server create 2017-04-25 23:33:12 +01:00
Adam Stankiewicz
4d465091dd Remove unnecessary parameter from NewHTTPServer 2017-04-10 16:24:49 +02:00
Alex Dadgar
76ab4b6448 Merge branch 'master' into refactor-parser 2017-02-20 15:13:21 -08:00
Diptanu Choudhury
f551dcb83e Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Alex Dadgar
03feb2efad Fix escaping 2017-02-15 15:14:47 -08:00
Alex Dadgar
24995a6749 Operator command/endpoint/documentation 2017-02-09 18:04:46 -08:00
Diptanu Choudhury
615fbbe17a Added a garbage collector for allocations 2016-12-14 15:01:12 -08:00