Commit Graph

55 Commits

Author SHA1 Message Date
Matt Keeler c056d6f0cf
Dont expect the freebsd/arm build 2018-10-19 14:50:51 -04:00
Jack Pearkes 0358c7a063 vendor: upgrade to latest version of gopsutil 2018-10-19 11:33:23 -07:00
Jack Pearkes a20804df28 build: exclude freebsd/arm 2018-10-19 11:32:35 -07:00
Matt Keeler 18b29c45c4
New ACLs (#4791)
This PR is almost a complete rewrite of the ACL system within Consul. It brings the features more in line with other HashiCorp products. Obviously there is quite a bit left to do here but most of it is related docs, testing and finishing the last few commands in the CLI. I will update the PR description and check off the todos as I finish them over the next few days/week.
Description

At a high level this PR is mainly to split ACL tokens from Policies and to split the concepts of Authorization from Identities. A lot of this PR is mostly just to support CRUD operations on ACLTokens and ACLPolicies. These in and of themselves are not particularly interesting. The bigger conceptual changes are in how tokens get resolved, how backwards compatibility is handled and the separation of policy from identity which could lead the way to allowing for alternative identity providers.

On the surface and with a new cluster the ACL system will look very similar to that of Nomads. Both have tokens and policies. Both have local tokens. The ACL management APIs for both are very similar. I even ripped off Nomad's ACL bootstrap resetting procedure. There are a few key differences though.

    Nomad requires token and policy replication where Consul only requires policy replication with token replication being opt-in. In Consul local tokens only work with token replication being enabled though.
    All policies in Nomad are globally applicable. In Consul all policies are stored and replicated globally but can be scoped to a subset of the datacenters. This allows for more granular access management.
    Unlike Nomad, Consul has legacy baggage in the form of the original ACL system. The ramifications of this are:
        A server running the new system must still support other clients using the legacy system.
        A client running the new system must be able to use the legacy RPCs when the servers in its datacenter are running the legacy system.
        The primary ACL DC's servers running in legacy mode needs to be a gate that keeps everything else in the entire multi-DC cluster running in legacy mode.

So not only does this PR implement the new ACL system but has a legacy mode built in for when the cluster isn't ready for new ACLs. Also detecting that new ACLs can be used is automatic and requires no configuration on the part of administrators. This process is detailed more in the "Transitioning from Legacy to New ACL Mode" section below.
2018-10-19 12:04:07 -04:00
Paul Banks f0c06a912e
Bump Go version for CI and build to 1.11.1 (#4782) 2018-10-11 12:21:53 +01:00
Mitchell Hashimoto e7dfb8a0d2
Detect correct GOOS/ARCH for copying binary with build_consul_local
If GOOS/ARCH is set to something custom, we need to unset it before
testing the value so we can compare to the _original value_.
2018-09-10 10:25:15 -07:00
Freddy b2032b05be
Add script and makefile goal to help debug flaky tests 2018-09-10 16:44:07 +01:00
Siva Prasad f8cc241b28
Fixed a make build issue with Windows Binaries. (#4538)
* Fixed an issue where Windows binary had trouble being copied correctly

* Enclosed binname inside angular brackets
2018-08-17 09:31:57 -04:00
John Cowen 80a307cb9f
UI: Add conditional enterprise logo (#4432)
Adds additional 'enterprise' text underneath the 'startup' logo if the
ui is built with a CONSUL_BINARY_TYPE environment variable that doesn't
equal `oss`.
2018-07-30 17:59:43 +01:00
Matt Keeler 21ff0d5087 Fix cross compiling with make
make XC_OS=linux XC_ARCH=amd64 when running on macos puts its binaries in ${GOPATH}/bin/linux_amd64/consul and not ${GOPATH}/bin/consul

This makes the build pull the binary from the right location.
2018-07-25 15:21:11 -04:00
John Cowen e918221275 Tiny ui build additions
1. Use `ls -A` to list dotfiles also, ready for tarring
2. Don't copy ember's `./tmp` if you have one
2018-07-06 15:08:11 +01:00
Matt Keeler 2cc7cd32af Fix default make target to build everything 2018-06-27 14:25:49 -04:00
Matt Keeler 8c50e62268 Make sure to disable cgo for dev builds without gox 2018-06-26 14:54:31 -04:00
Matt Keeler 8f2a19a747 Update verify.sh script 2018-06-26 12:08:33 -04:00
Matt Keeler 5ff7a65e7f Added capability to make dev-tree without pushing
No push is the default
2018-06-26 11:46:37 -04:00
Matt Keeler c8f706a141 Added release verification script
Also implemented shasum verification and gpg signature verification
2018-06-26 11:45:02 -04:00
Matt Keeler f926786292 Create a new ui_version function to pull it out of an index.html file
Also verify the ui version after it was built that it matches the env var we set in the build container.
2018-06-26 11:22:13 -04:00
Matt Keeler d6bc5bc2db Merge remote-tracking branch 'origin/feature/ui-build-version-messages' into bugfix/ui-release-version 2018-06-26 10:17:21 -04:00
Matt Keeler f32308b574 Make sure the release builds for the UI version to be consistent with the binary version. 2018-06-26 09:39:34 -04:00
John Cowen 1f978d860d Adds version messages both before and after the ui-v2 build
1. Prints the $version that you are passing through to the docker
container
2. Prints the CONSUL_VERSION that is used in the UI v2 footer
3. Additionally added a `mkdir -p` so so `make ui-docker` runs with a
clean exit if run in isolation
2018-06-26 10:33:22 +01:00
Matt Keeler f99f3f7b1a
Add a npm configuration
This is only necessary when dockerd is running on ubuntu and I dont know why it matters.
2018-06-25 11:27:10 -04:00
Matt Keeler b43a763c74 sed extended regex on linux sometimes requires -r 2018-06-25 10:19:02 -04:00
Matt Keeler 0a195fe88c Try a different way of doing x-platform in place sed 2018-06-25 10:01:43 -04:00
Matt Keeler 9862175481 Fix sed on linux 2018-06-22 17:21:42 -04:00
Matt Keeler 4e048162e0 Add override capability to blacklist a remote 2018-06-20 16:35:54 -04:00
Matt Keeler f35692daa6 Allow showing git diff interactively to inspect release commits. 2018-06-20 16:20:43 -04:00
Matt Keeler 3e8b7f3f38 Added more validation during publishing
We verify the git remote/url with whoever is running (in addition to other automated checks)
We also now run consul agent -dev, check is first 25 lines of output, consul info output and that consul leave works.
2018-06-20 15:39:09 -04:00
Matt Keeler aff1b93268 Update ui-v2 makefile to handle updating node_modules when needed
Also dont include the dist and node_modules folders in the build context.
2018-06-19 13:51:49 -04:00
Matt Keeler 21fcb45f36 PR Updates 2018-06-19 12:47:58 -04:00
Matt Keeler 90e74da6b7 Fix a couple find warnings on linux
Additionally add the ability to use go install for dev builds rather than gox (travis doesn’t have gox)
2018-06-19 10:49:07 -04:00
Matt Keeler 12d14f6c54 Allow for building pre-releases/rcs/betas 2018-06-18 17:06:38 -04:00
Matt Keeler 9457468423 Quote $@ when passing around 2018-06-18 14:53:50 -04:00
Matt Keeler 04ea404414 Fix gpg_key usage, also make the location of the binary to check the version of overridable 2018-06-18 13:42:46 -04:00
Matt Keeler fcd1811402 Don’t automatically populate release with dev when not generating a version based off git vars 2018-06-18 13:20:12 -04:00
Matt Keeler 46cfa577b0 Set the binary type 2018-06-18 13:09:41 -04:00
Matt Keeler 5381e78520 Pass the right var to git_push_ref 2018-06-18 12:34:30 -04:00
Matt Keeler 31b918d554 Return early when git changes are denied 2018-06-18 12:33:59 -04:00
Matt Keeler b739bbfefe Fixup version release detection 2018-06-18 11:57:35 -04:00
Matt Keeler ca1a0619bd Refactor a little to accomodate overriding packaging using directories 2018-06-18 11:33:16 -04:00
Matt Keeler 82857b2121 Use CONSUL_PKG_NAME in package_release 2018-06-18 10:26:04 -04:00
Matt Keeler f74386d425 Fix a bug in parse_version that prevented using auxillary version files 2018-06-18 10:07:29 -04:00
Matt Keeler 4daf669136 Only remove builds with the same suffix 2018-06-18 09:57:12 -04:00
Matt Keeler ebe6ca167f Add notion of a consul pkg name to coexist with enterprise 2018-06-18 09:32:00 -04:00
Matt Keeler 2dc2e94f31 Make sure to commit all version*.go files 2018-06-18 09:22:31 -04:00
Matt Keeler 4c9db8c5d0 Update the name of a function source 2018-06-18 09:21:38 -04:00
Matt Keeler 4bbd20ddfa Dont override set but null vars 2018-06-18 09:16:08 -04:00
Matt Keeler 414829f68b Make some room for overrides of build system functions 2018-06-18 09:06:57 -04:00
Matt Keeler 3f290cc676 Generalize git pushing in a bash function 2018-06-15 20:42:07 -04:00
Matt Keeler 30ff8b195b Add rsync so the ui can build again
Also add back the init target to the ui-v2 makefile
2018-06-15 14:44:14 -04:00
Matt Keeler 147e4a1eae Add capability to put tree back into dev mode via make dev-tree 2018-06-15 08:00:12 -04:00