Commit Graph

69 Commits

Author SHA1 Message Date
Ryan Uber 34fc9a37fd agent: parse raw query URL to avoid closing the request body early 2015-04-13 17:31:53 -07:00
Ryan Uber adbc5c92c6 agent: hide tokens from logs and monitor 2015-04-12 11:17:31 -07:00
Armon Dadgar a446fbd098 agent: Enable UI endpoints for SCADA 2015-02-18 15:15:02 -08:00
Armon Dadgar 6ee6f67695 agent: Use AtlasACLToken 2015-02-18 15:12:15 -08:00
Armon Dadgar 269153705b agent: Fixing setup of SCADA HTTP listener 2015-02-18 15:12:15 -08:00
Armon Dadgar d9f95e2983 agent: Fixing panic on shutdown 2015-02-18 15:12:15 -08:00
Armon Dadgar 948f9a0d00 agent: SCADA HTTP listener 2015-02-18 15:12:14 -08:00
Ryan Uber 068c4137cb agent/http: clean up socket setup 2015-01-23 17:57:04 -08:00
Armon Dadgar 14d55cb40a Merge pull request #622 from hashicorp/f-sockets
Unix domain sockets
2015-01-21 16:30:03 -08:00
Ryan Uber b71ffb1fa3 agent: change node maintenance endpoint 2015-01-21 10:57:44 -08:00
Ryan Uber c01277725a agent: beginning socket user/group/mode support as discussed in #612 2015-01-20 13:44:27 -08:00
Ryan Uber 8ea9eb87ea agent: node maintenance mode works 2015-01-16 15:38:13 -08:00
Ryan Uber 4f4eb204f6 agent: first pass at service maintenance mode 2015-01-16 15:37:51 -08:00
Ryan Uber 263614d596 agent: error if binding to existing socket file 2015-01-16 12:39:15 -08:00
Ryan Uber 61d2f71d14 agent: only ignore errors on IsNotExist() 2015-01-16 09:14:52 -08:00
Ryan Uber ad19c0afc2 agent: beginning refactor 2015-01-16 00:45:03 -08:00
Jeff Mitchell 400eadd671 RPC and HTTP interfaces fully generically-sockified so Unix is supported.
Client works for RPC; will honor CONSUL_RPC_ADDR. HTTP works via consul/api;
honors CONSUL_HTTP_ADDR.

The format of a Unix socket in configuration data is:
"unix://[/path/to/socket];[username or uid];[gid];[mode]"

Obviously, the user must have appropriate permissions to create the socket
file in the given path and assign the requested uid/gid. Also note that Go does
not support gid lookups from group name, so gid must be numeric. See
https://codereview.appspot.com/101310044

When connecting from the client, the format is just the first part of the
above line:
"unix://[/path/to/socket]"

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Armon Dadgar 1088a5c170 Merge pull request #558 from ceh/http-api-response-headers
add ability to specify response headers on the HTTP API
2015-01-05 11:36:08 -08:00
Thordur Bjornsson 8beb1bb848 handle ?pretty similarly to ?stale, ?consistent etc. 2015-01-02 08:00:08 +01:00
Emil Hessman db23a3f0e9 add ability to specify response headers on the HTTP API
Add an config object that allows adding HTTP header response fields to every
HTTP API response.

Each specified header is added to every response from all HTTP API endpoints.
Each individual endpoint may overwrite the specified header, which makes sure
that Consul headers such as 'X-Consul-Index' is enforced by the API.
2014-12-28 19:17:08 +01:00
Atin Malaviya b623af776b Consul Session TTLs
The design of the session TTLs is based on the Google Chubby approach
(http://research.google.com/archive/chubby-osdi06.pdf). The Session
struct has an additional TTL field now. This attaches an implicit
heartbeat based failure detector. Tracking of heartbeats is done by
the current leader and not persisted via the Raft log. The implication
of this is during a leader failover, we do not retain the last
heartbeat times.

Similar to Chubby, the TTL represents a lower-bound. Consul promises
not to terminate a session before the TTL has expired, but is allowed
to extend the expiration past it. This enables us to reset the TTL on
a leader failover. The TTL is also extended when the client does a
heartbeat. Like Chubby, this means a TTL is extended on creation,
heartbeat or failover.

Additionally, because we must account for time requests are in transit
and the relative rates of clocks on the clients and servers, Consul
will take the conservative approach of internally multiplying the TTL
by 2x. This helps to compensate for network latency and clock skew
without violating the contract.

Reference: https://docs.google.com/document/d/1Y5-pahLkUaA7Kz4SBU_mehKiyt9yaaUGcBTMZR7lToY/edit?usp=sharing
2014-12-07 12:38:22 -05:00
Armon Dadgar de35a8e38f agent: Fixing port collision in tests 2014-11-19 11:51:25 -08:00
Atin Malaviya 2bd0e8c745 consul.Config() helper to generate the tlsutil.Config{} struct, 30 second keepalive, use keepalive for HTTP and HTTPS 2014-11-18 17:56:48 -05:00
Atin Malaviya b4424a1a50 Moved TLS Config stuff to tlsutil package 2014-11-18 11:03:36 -05:00
Atin Malaviya 59a68ecc26 Added HTTPS support via a new HTTPS Port configuration option similar to the HTTP Port. 2014-11-17 14:29:35 -05:00
Armon Dadgar 8ee22d7fc4 agent: Fixing multiple headers for /v1/event/list endpoint. Fixes #361 2014-10-13 17:53:54 -07:00
Armon Dadgar 93c925dd14 agent: First pass at event endpoints 2014-08-28 13:42:07 -07:00
Armon Dadgar 8fad8538e8 agent: ACL violation returns 403 code 2014-08-22 12:59:47 -07:00
Armon Dadgar 4a61a8bd31 agent: Rename acl delete to destroy 2014-08-18 15:46:58 -07:00
Armon Dadgar 4e7d57a3db agent: Adding token parsing 2014-08-18 15:46:23 -07:00
Armon Dadgar d3065d1532 agent: Special handler if ACL support is disabled 2014-08-18 15:46:23 -07:00
Armon Dadgar 6f7bf36ee9 agent: ACL endpoint tests 2014-08-18 15:46:21 -07:00
Armon Dadgar d628aab646 agent: ACL endpoint 2014-08-18 15:46:21 -07:00
Eric Connell 6c3aaa81c1 modified so ?pretty=anything will work 2014-08-01 14:28:46 -06:00
Eric Connell e31c6b8b83 make pretty condition more readable 2014-08-01 14:24:36 -06:00
Eric Connell 316673a2e5 added URL query parameter of "pretty=true" to output formatted json from the HTTP API 2014-08-01 14:11:51 -06:00
William Tisäter a028c3ae93 Add `/v1/agent/self` and return local agent config 2014-05-27 01:15:33 +02:00
Armon Dadgar d5b1330227 agent: First pass at session endpoints 2014-05-20 16:25:29 -07:00
Armon Dadgar d1648871ea agent: Adding UI services endpoint 2014-04-30 23:43:59 -04:00
Armon Dadgar 250b8f2247 agent: Adding node UI endpoint 2014-04-30 23:43:59 -04:00
Armon Dadgar c794dac7b1 agent: Adding nodes UI endpoint 2014-04-30 23:43:59 -04:00
Armon Dadgar c6b326a362 agent: Redirect to UI if we have one 2014-04-30 23:43:58 -04:00
Armon Dadgar ba69350cef agent: Simplify serving of ui files 2014-04-30 23:43:57 -04:00
Armon Dadgar 6f833a5a73 agent: Improving UI file serving 2014-04-30 23:43:56 -04:00
Armon Dadgar 4983f66e75 agent: Adding endpoint to serve the UI 2014-04-30 23:43:56 -04:00
Armon Dadgar 32889c2f70 agent: Pass UiDir into the HTTP layer 2014-04-30 23:43:56 -04:00
Armon Dadgar cb33d73ffe Merge pull request #68 from hashicorp/f-consistency
Adding support for "stale" and "consistent" read modes
2014-04-21 15:55:31 -07:00
Armon Dadgar 48ce8e3e86 agent: Fix decoding of checks. Fixes #60 2014-04-21 15:02:36 -07:00
Armon Dadgar 53d3449947 agent: Remove wrapQuery, call setMeta directly 2014-04-21 12:40:11 -07:00
Armon Dadgar 4c039aa4d5 agent: Parse the consistency flags 2014-04-21 12:26:12 -07:00