Michal Nicpon
983f9e59b3
Include CVE scores when listing software ( #5673 )
2022-05-20 10:58:40 -06:00
Martin Angers
b3fc0cd844
Unversion the /setup endpoint, version the websocket endpoint ( #5104 )
2022-04-20 15:57:26 -04:00
Martin Angers
fd0cd153ce
Fix SSO paths to always use /v1/
instead of /latest/
( #5246 )
2022-04-20 12:46:45 -04:00
Lucas Manuel Rodriguez
f7048b711c
Fix race condition in tests when using global var loginRateLimit ( #5197 )
2022-04-19 10:35:53 -03:00
Lucas Manuel Rodriguez
60b7425bef
Add http basic auth to /metrics ( #4974 )
...
* Add http basic auth to /metrics
* Fixes after testing applying of a --config sample.yml
* Add unit test
2022-04-07 09:40:53 -03:00
Martin Angers
90b15071a4
Introduce API version 2022-04, deprecate use of /global
in paths ( #4731 )
2022-04-05 11:35:53 -04:00
Lucas Manuel Rodriguez
57816592ba
Add read replica testing helpers and fix non-sso login bug ( #4908 )
...
not set on the INSERT.
- OUT: Only sets the ID on the passed session and returns it. (`CreatedAt`, `AccessedAt`, are not set.)
New version:
```go
func (ds *Datastore) NewSession(ctx context.Context, userID uint, sessionKey string) (*fleet.Session, error) {
sqlStatement := `
INSERT INTO sessions (
user_id,
` + "`key`" + `
)
VALUES(?,?)
`
result, err := ds.writer.ExecContext(ctx, sqlStatement, userID, sessionKey)
if err != nil {
return nil, ctxerr.Wrap(ctx, err, "inserting session")
}
id, _ := result.LastInsertId() // cannot fail with the mysql driver
return ds.sessionByID(ctx, ds.writer, uint(id))
}
```
- IN: Define arguments that are truly used when creating a session.
- OUT: Load and return the fleet.Session struct with all values set (using the `ds.writer` to support read replicas correctly).
PS: The new `NewSession` version mimics what we already do with other entities, like policies (`Datastore.NewGlobalPolicy`).
2022-04-04 16:52:05 -07:00
Michal Nicpon
a6902cc083
Add os versions endpoint ( #4749 )
2022-03-28 09:15:45 -06:00
Benjamin Edwards
74bb559645
Add public ip to hosts & derive geolocation when rendering host ( #4652 )
...
* geoip wip
* return nil if ip is empty string or if ParseIP returns nil
* add ui component to render geolocation if available, address PR feedback
* render public ip if available
* add changes file, document geoip in deployment guide
* update rest-api docs
2022-03-21 12:29:52 -04:00
Martin Angers
bb678b6b2e
Add support for downloading a list of hosts in CSV format ( #4596 )
2022-03-15 15:14:42 -04:00
Martin Angers
fc01947ae7
Allow global admin to change anyone's password. ( #4582 )
2022-03-15 08:11:53 -04:00
Martin Angers
a1c67547b3
Add new endpoints to retrieve device information by orbit identifier ( #4531 )
2022-03-09 16:13:56 -05:00
Martin Angers
c8bc026d6f
Migrate special-case endpoints to new pattern ( #4511 )
2022-03-08 11:27:38 -05:00
Martin Angers
c40fdd783e
Migrate host-authenticated endpoints to new pattern ( #4403 )
2022-03-07 13:10:55 -05:00
Martin Angers
e29797deb0
Migrate the last batch of authenticatedUser
endpoints to the new pattern ( #4210 )
2022-02-15 15:22:19 -05:00
Zachary Winnerman
c5c72ed713
Add apm for testing apm ( #4053 )
...
* Add apm for testing apm
* Testing opentracing
* testing
* Testing
* go fmt
* Add config switch for tracing.
* fixup
* Update cmd/fleet/serve.go
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
* Add support for both elasticapm and opentelemetry
* Fix driver stuff and config options
* Fixup
* fixup
* Add changes file
* Add config for sql driver
* fixup
* Add doc to exported field
* testing
* fixup
* fixup
* Testing again
* fixup
* testing
* Undo
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-02-15 12:42:22 -05:00
Tharun Rajendran
2084b7d310
feat(api): add endpoint to get team by id ( #4018 )
...
* feat(api): add endpoint to get team by id
* fix review feedbacks
* add integration test in enterprise suite
2022-02-04 14:33:22 -03:00
Martin Angers
ecf6bd8907
Migrate more user-authenticated endpoints to new pattern ( #3933 )
2022-01-31 16:35:22 -05:00
Tomas Touceda
ffabf803a3
Aggregate munki and mdm data ( #3886 )
...
* Aggregate munki and mdm data
* Update doc
* Use reader to read
* Reader to read
* Address review comments
2022-01-26 17:55:07 -03:00
Martin Angers
8b8cebb6fe
Migrate remaining user-authenticated endpoints ( #3796 )
2022-01-25 09:34:00 -05:00
Tomas Touceda
9d572309ae
Add sentry ( #3669 )
...
* Add sentry
* Fix gosum
* More gosum fixes
* Add missing def for config
* Enrich sentry scope a bit
* Add changes file
* Add goroutine safe scope to errors
* Encapsulate sentry logic
* Add documentation for new flag
* Add sentry capturing to crons and other background tasks
* Only send to sentry when enabled
2022-01-20 16:41:02 -03:00
Martin Angers
afb3310937
Migrate team-related endpoints to new pattern ( #3740 )
2022-01-19 10:52:14 -05:00
Martin Angers
597144bfac
Migrate most users endpoints to the new pattern ( #3366 )
2022-01-10 14:43:39 -05:00
Martin Angers
1e2059585a
Add support for google chrome profiles ( #3423 )
2021-12-21 15:36:19 -05:00
Tomas Touceda
fe67b0486b
Finish first draft of API versions ( #3216 )
...
* Finish first draft of API versions
* wip
* Finalize tests
* Revert change in handler
* Remove made up version
* Update versioning with aliases
* Add changes file
* Address review comments
* Revert overupdated routes
* Expand life time of deprecated APIs
* Fix test
* Comment out problematic part of test
* Revert bad path changes
2021-12-21 12:23:12 -03:00
Martin Angers
a74e562893
Migrate labels endpoints to new pattern ( #3354 )
2021-12-21 09:53:15 -05:00
Tomas Touceda
39e71c6d77
Add mdm and munki ( #3406 )
...
* Draft for mdm and munki as direct ingest funcs
* Expose mdm/munki over API
* Add test for service and fix bug
* Update queries test
* Fix lint
* Address review comments
2021-12-21 09:37:58 -03:00
Martin Angers
e988d16eb3
Update the prometheus go client library ( #3140 )
2021-12-20 09:20:58 -05:00
Martin Angers
6d1a55a107
Migrate scheduled queries endpoints to new pattern ( #3260 )
2021-12-15 10:23:08 -05:00
Martin Angers
73e1c801ee
Migrate packs endpoints to new pattern ( #3244 )
2021-12-15 09:35:40 -05:00
Martin Angers
af42a0850e
Migrate global scheduled queries endpoints to new pattern ( #3235 )
2021-12-15 09:06:34 -05:00
Martin Angers
0cc57bd294
Mna 1782 migrate endpoints ( #3226 )
2021-12-14 16:34:11 -05:00
Tomas Touceda
a0404b6736
Add software count API ( #3105 )
...
* Add software count API
* Fix makefile
* Fine no mock generating at this point
* Actually, one last try
* Use go install instead
* Fix go sum/mod
* Improve documentation
* Try setting node to 14
2021-12-03 10:54:17 -03:00
Martin Angers
7464e72ba8
Move carves endpoints to new endpoint pattern ( #3148 )
2021-12-01 15:45:29 -05:00
Martin Angers
5c113bd468
Refactor ListActivities to new endpoint pattern ( #3115 )
2021-11-29 08:12:22 -05:00
Lucas Manuel Rodriguez
964f85b174
Amend policy creation and spec (for proprietary query), and add update APIs ( #2890 )
...
* Amend policy creation (proprietary query), add update APIs
* Fix Datastore.SavePolicy bug (and add tests)
* Add integration tests for new policy APIs
* Add author email
* Add activities
* Push breaking changes for return policy fields
* WIP
* Add integration test for host policies
* Make more improvements to policy representation
* Improve upgrade code (from PR review comments)
* PR changes
* Revert activities for policies
* Use *uint instead of uint for queryID, use fleet.PolicyPayload
* Filter out other schemas
* New policy flow (#2922 )
* created new policy flow -- no API connection
* added api props
* fixed prop name
* lint fixes
* removed unused modal; fixed style
* name, desc icons; created global components
* lint fixes
* ignoring certain files and lines for prettier
* Update frontend/pages/policies/PolicyPage/PolicyPage.tsx
* Make policy names unique across deployment
* Amend upgrade script
* Fix migration for unique names
* Do not deduplicate but instead rename policies
Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
2021-11-24 14:16:42 -03:00
Martin Angers
69a4985cac
Use new error handling approach in other packages ( #2954 )
2021-11-22 09:13:26 -05:00
Martin Angers
3ae57a0242
Create errors with ctxerr, add the call to store them in redis ( #2786 )
2021-11-15 09:11:38 -05:00
Tomas Touceda
a0730ca643
Add update invite API ( #2837 )
2021-11-11 17:33:06 -03:00
gillespi314
229b91b530
Add endpoint for management of team enroll secrets ( #2849 )
2021-11-11 10:45:39 -06:00
Martin Angers
b57b64ccb2
Add total and per platform counts to host summary endpoint ( #2845 )
2021-11-09 09:35:36 -05:00
Tomas Touceda
79f2c7c391
Issue 1798 rest api for live queries ( #2675 )
...
* wip
* wip
* Make tests not flaky
* Add changes file
* Make logging and authz thread safe
* Move cancel defer below err check
2021-10-26 11:33:31 -03:00
Tomas Touceda
d3a0d62902
Issue 2456 policies yaml ( #2512 )
...
* wip
* Add policy specs support
* Add documentation
* Make policy apply idempotent
* Fold in code
* Improve tests and simplify auth checks
* Lint and fix test
2021-10-15 07:34:11 -03:00
Martin Angers
5e1f872ccb
Refactor ListHosts to new endpoint pattern ( #2396 )
2021-10-11 10:37:48 -04:00
Martin Angers
fce3e42abb
Refactor GetPack to new endpoint pattern ( #2409 )
2021-10-11 10:17:21 -04:00
Tomas Touceda
876aa0e366
Add host count API ( #2356 )
...
* Add host count API
* Add rest api docs
* Add host count for labels and address review comments
* Add regex for id
2021-10-07 08:25:35 -03:00
Tomas Touceda
d9f34b2c19
Issue 1840 bulk delete hosts ( #2268 )
...
* wp
* Add test by ids
* Add changes file
* Update docs and remove unneeded return values
* Address review comments
* Improve integration tests
* Use TearDownTest
2021-09-29 13:13:23 -03:00
Tomas Touceda
5653f1e868
Update URLs from team to teams, add tests for policy auth ( #2228 )
...
* Update URLs from team to teams, add tests for policy auth
* Fix test
* Address review comments
2021-09-27 14:02:11 -03:00
Tomas Touceda
baa42d367e
Add team policies ( #2103 )
...
* Add team policies
* Add team policy documentation
* Add changes file
* Update titles
* Fix lint
* Rewrite TeamAuthorize for more clarify
* Explicitly use two slices for clarity
* Simplify switch
2021-09-20 11:00:57 -03:00
Tomas Touceda
176037cad2
Implement fleetctl get software and the underlying API ( #1999 )
...
* Implement fleetctl get software and the underlying API
* Add documentation
* Simplify list software implementation
* Lint fixes
* Make team name unique
* Address review comments
* Fix lint
* Fix tests
2021-09-14 10:58:48 -03:00