Commit Graph

994 Commits (f06b5d6de4c6ba813c83016cdc3a84172681dd5c)

Author SHA1 Message Date
Daniel Moran 1e324b6a63
fix(cmd/influxd): remove internal subcommands of `upgrade` from help text (#20076) 2020-11-17 15:37:43 -05:00
J. Emrys Landivar 478d25e774
feat(cmd/influx): Add DBRP cli commands as `influx v1 dbrp` (#20067)
Co-authored-by: Dan Moran <dmoran@influxdata.com>
2020-11-17 15:14:55 -05:00
Daniel Moran 632e8f11ed
fix(cmd/influxd): don't validate unused paths in `upgrade` (#20052) 2020-11-17 00:38:53 -05:00
Daniel Moran b732f3663c
feat(cmd/influxd): export 1.x continuous queries as part of upgrade (#20039) 2020-11-16 16:37:47 -05:00
Stuart Carnie 1cd9d0b04a feat: Port pipeline tests package from Cloud
This package provides essentially the same API as the Cloud tests
package, utilising the `TestLauncher` type.

Additional With functional options were added to the `Launcher`
in order to expose type-safe configuration of InfluxQL configuration.
Additional With options may be added in the future as the need arises.
2020-11-17 08:14:17 +11:00
Daniel Moran 693d153195
feat(cmd/influxd): warn if auth wasn't enabled and users were upgraded (#20036) 2020-11-16 09:05:40 -05:00
George MacRorie 5954db8c4d chore(documents): reinstate minimal read-only document store for dashboard templates 2020-11-16 12:41:26 +00:00
George MacRorie 16d916a952 refactor(kv): delete deprecated kv service code
This includes removal of a lot of kv.Service responsibilities. However,
it does not finish the re-wiring. It removes documents, telegrafs,
notification rules + endpoints, checks, orgs, users, buckets, passwords,
urms, labels and authorizations. There are some oustanding pieces that
are needed to get kv service compiling (dashboard service urm
dependency). Then all the call sites for kv service need updating and
the new implementations of telegraf and notification rules + endpoints
needed installing (along with any necessary migrations).
2020-11-16 12:41:26 +00:00
Daniel Moran 4efb8515b8
fix(cmd/influxd): validate all input paths to `upgrade` up-front (#20012) 2020-11-13 09:25:57 -05:00
Stuart Carnie fab99c9512 chore: Remove fragile nats port assignment loop
This resolves observed race conditions when running test suites that
utilize the launcher. It also reduces test times considerably, by
eliminating a slow loop to find a port.
2020-11-13 09:13:48 +11:00
Stuart Carnie aa8064a43a fix: PR Feedback 2020-11-13 08:47:52 +11:00
Stuart Carnie 42aabb28fc chore: Do not use global viper APIs, which breaks testing 2020-11-13 08:47:52 +11:00
Daniel Moran 518098e4f3
fix(cmd/influxd): suggest running with -h on error instead of printing usage (#19995) 2020-11-11 16:37:36 -05:00
Ben Johnson b5f127597a fix: Use --skip-verify flag for backup/restore CLI command.
This commit passes the `--skip-verify` flag to the underlying HTTP
client in for the `BackupService` & `RestoreService`.
2020-11-11 12:54:22 -07:00
Daniel Moran 15b9531273
fix: correct various typos (#19987)
Co-authored-by: kumakichi <xyesan@gmail.com>
2020-11-11 13:54:21 -05:00
Daniel Moran d8e7de93cc
fix: check write permission in legacy write path (#19980) 2020-11-10 18:41:50 -05:00
alespour 2982701d01
fix(upgrade): add log-level CLI option (#19967)
Co-authored-by: Daniel Moran <danxmoran@gmail.com>
2020-11-10 17:23:29 -05:00
alespour c4eb6290f0
fix(upgrade): check for existing 2.x CLI configs file during upgrade (#19969)
Co-authored-by: Daniel Moran <danxmoran@gmail.com>
2020-11-10 16:42:51 -05:00
alespour 63974e8fe7
fix(upgrade): remove obsolete unused option (influx-command-path) (#19972) 2020-11-10 15:37:38 -05:00
Daniel Moran b643482c45
fix(upgrade): use 10 instead of MaxInt when rewriting query-concurrency (#19959) 2020-11-09 19:00:30 -05:00
Stuart Carnie 3c9ee3f8af chore: Improve help for --no-password switch 2020-11-10 10:38:36 +11:00
Russ Savage cae539055f
fix: updating v1 auth description (#19947)
* fix: updating v1 auth description

* fix: fixing tests

* chore: renaming to legacy
2020-11-09 15:10:46 -08:00
Daniel Moran 3317ea0644
fix: enable write-only users to pass auth checks in the V1 API (#19945) 2020-11-09 18:10:35 -05:00
alespour 07e009c616
fix(upgrade): create CLI configs (#19937)
Co-authored-by: docmerlin (j. Emrys Landivar) <landivar@gmail.com>
Co-authored-by: Daniel Moran <danxmoran@gmail.com>
2020-11-09 17:43:28 -05:00
Daniel Moran b4aa582750
fix(upgrade): use db/rp naming convention when upgrading DBs (#19952) 2020-11-09 17:19:04 -05:00
Stuart Carnie 85b9d84e57 fix: PR Feedback 2020-11-09 15:22:05 -05:00
Stuart Carnie 5cec8a44cc fix: Improve `v1 auth` CLI UI
The enhancements and fixes to the user experience are as follows:

* Rename active and inactive commands to the actions set-active and
  set-inactive respectively to clarify their behavior

  To set a token to active:

  ```
  influx v1 auth set-active
  ```

  To set a token to inactive, preventing its use:

  ```
  influx v1 auth set-inactive
  ```

* allow `--id` or `--username` anywhere a single authentication token is
  required

* use separate vars to store the flag state of each command

* factor out the behavior to find a single authentication token into
  a shared function, `v1FindOneAuthorization`
2020-11-09 15:22:05 -05:00
Daniel Moran 040f5b208a
fix: replace 0 with MaxInt when upgrading query-concurrency (#19930) 2020-11-09 12:01:09 -05:00
Daniel Moran ca547cfb29
fix: make influxd help more specific (#19939) 2020-11-09 11:45:15 -05:00
Daniel Moran ee390ddfd3
fix: parsing of retention policy CLI args in `influx setup` and `influxd upgrade` (#19928) 2020-11-06 17:50:32 -05:00
Daniel Moran a89041b182
fix(cmd/influxd/upgrade): delete references to 'security script' in upgrade command (#19924) 2020-11-06 15:32:38 -05:00
Adrian Thurston 30ad7281aa
refactor: replace builtin package with fluxinit/static (#3304) (#19909)
A static initialization is not desirable in the main binaries, as it forces all
paths of code to init, but it is still useful in tests. It allows static
intialization to be performed once for all tests and eliminates the need to
always add the FluxInit call. Added a fluxinit/static package that calls
fluxinit.FluxInit() to replace the builtin package. This hides the nature of
the initialization and makes it clear that it is mandatory initialization code
getting called.
2020-11-05 16:54:28 -08:00
Ben Johnson 419b0cf76b feat: Implement full restore 2020-11-05 10:05:01 -07:00
Ben Johnson 5f1968b331 fix: Skip deleted shard groups during backup 2020-11-05 10:05:01 -07:00
Ben Johnson 6e1097c625 feat: Minor updates to backup/restore 2020-11-05 10:05:01 -07:00
Ben Johnson 23679c2375 feat: Implement backup/restore CLI subcommands. 2020-11-05 10:05:01 -07:00
George 8ca2989717 feat(dashboards): isolate service in own package (#19852)
feat(dashboard): add owner ID to dashboard model

This adds the explicit OwnerID field to Dashboard and also adds a
migration which populates dashboard owners IDs based on dashboard owner
URMs.

feat(dashboards): isolate service in own package

This change isolates the dashboards service into its own package. It
also updates the API to no longer interface with user resource mappings.
Instead it defines new handlers which rely on the newly populated owner
ID field.

chore(dashboards): port tests from http package into new service transport package

chore(launcher): use dashboard transport package client in launcher tests

chore(kv): remove now defunkt dashboard service implementations
2020-11-04 15:53:02 +00:00
George MacRorie b274e15eac fix(telegraf): support pagination parameters when listing 2020-11-04 15:53:02 +00:00
George MacRorie 5feea36e16 refactor(telegraf): remove references to kv service telegraf service implementation 2020-11-04 15:53:02 +00:00
Adrian Thurston 37ef9d2791
fix: use fluxinit package to init flux library instead of builtin (#19887)
* fix: use fluxinit package to init flux library instead of builtin

The builtin package performs costly initialization work in the go init()
function, which causes the work to be performed for all paths of the main
executables that need it, including help screens. This patch uses the fluxinit
package, which requires a call to do the costly work. It allows help screens
and other code paths to execute quickly.

* fix: need to draw in the influxdb-specific standard library in fluxinit
2020-11-03 13:07:41 -08:00
Dan Moran 428a46b75e fix: remove division of RP in upgrade command
DB-side services no longer multiply requested RPs by time.Hour, so
the upgrade command shouldn't divide by that factor.
2020-11-03 12:37:50 -05:00
Stuart Carnie a0958e6603 fix: Add Logger to constructor function to ensure it is initialized 2020-11-02 18:00:22 -07:00
Ales Pour 0853370cda refactor: use v1 auth service to create tokens 2020-11-02 09:06:34 -07:00
Stuart Carnie 62a00fcf71 chore: Use new authorization client 2020-11-02 08:28:22 -07:00
jl fbe85ef548 feat: enable window pushdowns 2020-10-30 18:09:38 -07:00
Stuart Carnie 7e1226b298 feat: Use AuthorizerV1 for authorizing 1.x API requests
Setup the AuthorizerV1 in the launcher and pass this to the V1
authentication handler for authorizing 1.x HTTP requests.
2020-10-30 11:56:09 -07:00
Christopher M. Wolff 5a60488729
fix: make tagKeys and tagValues work for edge cases involving _field (#19856) 2020-10-30 10:37:08 -07:00
Stuart Carnie ecbb5987a6 feat: add v1 auth set-password command to set token passwords
* Added capability to HTTP API to search for tokens by ID or Token
2020-10-29 08:21:38 -07:00
Stuart Carnie 4f85ce82a8 feat(cli): Extend CLI with v1 authorization commands
This commit add a series of new subcommands to the `influx` CLI tool.

* `influx v1` to host any InfluxDB v1 specific commands
* `influx v1 auth` for v1 authorization token management.

The commands provide access to the private authorization APIs
used to manage authorization tokens for v1 compatibility APIs,
including:

* `/write`
* `/query`

Closes #19765
2020-10-29 08:21:38 -07:00
Stuart Carnie 6bc4158a46 feat(authorization): Add bcrypt password support to v1 authorizations
This commit extends the `v1/authorization` package to support
passwords associated with a token.

The summary of changes include:

* authorization.Service implements influxdb.PasswordsService
* Setting passwords for authorizations
* Verifying (comparing) passwords for a given authorization
* A service to cache comparing passwords, using a weaker hash
  that will live in memory only. This implementation is copied
  from InfluxDB 1.x
* Extended HTTP service to set a password using
  /private/legacy/authorizations/{id}/password

Closes #
2020-10-28 13:03:42 -07:00