Commit Graph

47 Commits

Author SHA1 Message Date
Agniva De Sarker
e3255879ba Enable gossip encryption (#14640)
* Enable gossip encryption

* Fix order

* Auto-generate key

* Update gorp fork to include BeginTx

* Add a test for InsertIfExists

And point gorp to a custom branch for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 14:16:15 +05:30
Eli Yukelzon
008961ba2f MM-20951 Add sentry support to mattermost-server (#14405) 2020-05-21 16:13:37 +03:00
Miguel de la Cruz
0154b8059b [MM-20979] Add first implementation of the Bleve search engine (#14562)
* [MM-20979] Add first implementation of the Bleve search engine

* Fix i18n

* Migrate searchengine utils tests

* Fix linter

* Don't add allTermsQ if both termQueries and notTermQueries are empty

* Fix test that should work if user is system admin

* Modify naming according to review comments

* Abstract getIndexDir function

* Extracting bleve engine name as a constant

* Merge both Indexer interfaces into one

* Add worker stopped message

* Allow worker to be started/stopped with config change

* Use constants for index names

* Modify test order

* Fix linter

* Trying to unlock the CI
2020-05-20 01:29:55 +02:00
Martin Kraft
d7cb890f34 MM-25095: Handles static JS and CSS using Brotli encoding. (#14524)
* MM-25095: Handles static JS and CSS files using Brotli.

* MM-25095: Linting fix.

* MM-25095: Adds missing license.

* MM-25095: Moves initialization of slice.

* MM-25095: Moves initialization of slice.
2020-05-19 08:40:13 -04:00
Agniva De Sarker
9dc64173dc MM-24817: Bump hashicorp/memberlist (#14467)
Automatic Merge
2020-05-12 08:32:16 -07:00
Doug Lauder
41ccd0c755 MM-24484 allow base64 certs in config for TLS Syslog (#14445) 2020-05-06 19:45:03 -04:00
Agniva De Sarker
03a55367d9 MM-24312: Fix Dependency updates (#14391)
Automatic Merge
2020-04-29 14:06:09 -07:00
Doug Lauder
50821d1a34 update github.com/minio/minio-go/v6 to v6.0.53 (#14349) 2020-04-23 00:15:06 +08:00
George Goldberg
6cabc40e62 MM-23568: Add rudder to server diagnostics. (#14151)
* MM-23568: Add rudder to server diagnostics.

* Add unit test.

* Go mod tidy.

* CSP Header fix.

* Fix review comments.

* Update web/handlers.go

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>

* Partially address review comments.

* fix tests.

* Finish implementing review suggestions and then fixing tests.

* Fix CSP Header tests.

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-04-21 09:23:00 +01:00
Jesse Hallam
29fae242e1 Revert "Dependency updates. (#14033)" (#14304)
This reverts commit f14c79f170.
2020-04-17 14:26:29 -03:00
George Goldberg
f14c79f170 Dependency updates. (#14033)
* Update dependencies.

* Fix tests.
2020-04-08 10:51:04 +01:00
Doug Lauder
6a27ed4a1d MM-22785 audit server CLI (#14144)
Add auditing to server CLI.

Also:
- simplify auditing in API layer
- reduce number of AddMeta calls
- have models serialize themselves
- more consistent field naming
2020-04-08 00:52:30 -04:00
Agniva De Sarker
125ed3a4cf MM-23817: Use auto-vendoring (#14231)
With Go 1.14 (https://tip.golang.org/doc/go1.14#go-command),
it now automatically checks for the existence of a vendor directory.

So there is no need to explicitly set the `-mod=vendor` flag.
2020-04-07 09:01:06 +05:30
Doug Lauder
16b535314d MM-23222 mirror audit logs to file (#14062)
* MM-23222 add file target (with rotation) to audit

* MM-23222 mirror syslog audits to local filesystem

    * provides config options for file name, max size, max age

    * rotates files based on max size and max age; delete as needed based on max backups

* include cluster id in log records

* sort meta data fields
2020-03-17 16:12:56 -04:00
Doug Lauder
4ac0619c90 MM-22273 New auditing system (phase 1) (#13967)
* New auditing API outputting to syslog via TLS

* New config section for specifying remote syslog server IP, port, and cert.

* Legacy audit API retained for access history feature
2020-03-12 15:50:21 -04:00
Miguel de la Cruz
182c29b456 MM-21898: Part 2. Add opentracing (#13904)
* initial implementation of opentracing

* app layer

* Revert Makefile

* .

* cleanup

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* [ci]

* autogenerate interface

* .

* missed vendor files

* updated interfaces

* updated store layers

* lint fixes

* .

* finishing layer generators and nested spans

* added errors and b3 support

* code review

* .

* .

* fixed build error due to misplased flag.Parse()

* code review addressed
2020-03-05 14:46:08 +01:00
Carlos Tadeu Panato Junior
3c8a5f863b update golang.org/x/crypto (#13930)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-04 16:06:39 +01:00
Agniva De Sarker
376ec9e0e3 Remove unnecessary struct2interface dependency (#13929)
* Remove unnecessary struct2interface dependency

Running go mod tidy on the repo removes it.
This was also preventing 1.14beta from running the repo,
because now it verifies modules.txt with go.mod, which had a mismatch.

* fixing CI

* Fix test-server target

* Fix some discrepancies in vendor

* Removing the Makefile target for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-27 09:46:13 +05:30
Ali Farooq
e4fb5791b0 MM-21626, MM-21627 - Plugin API/Hooks Prometheus instrumentati… (#13825)
* MM-21626,MM-21627 - Plugin API/Hooks Prometheus instrumentation

* Updated einterface mocks

* Fixed supervisor tests

* ignoring golint errors for plugin metrics wrappers

* Making golangci happy

* Using variadic form when generating wrapper code

* Removed artificial delay

* Removed comments from tests

* Renaming plugin wrappers to api/hooks_timer_layer

* updating vendor dir and mod files

* Recording plugin api/hook responses in prometheus

* Updated einterfaces-mocks

* Updating go sum

* Updating go sum

* Fixing conflicts

* More conflicts fixing

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-14 15:47:43 -05:00
Eli Yukelzon
17523fa5d9 MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
George Goldberg
d7206d2ede Update dependencies. (#13778) 2020-02-03 08:19:38 -08:00
Maria A Nunez
87eb7697f9 MM-19606- Rework Prepackaged Plugins (#13449)
* MM-19609 - Add new prepackage configuration settings (#13062)

* Add signatures to the prepackaged plugins (#13138)

* MM-19612 - Support querying local plugin marketplace when upst… (#13250)

* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled

* Update translations file

* Fixed comment

* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins

* Fixed unit tests

* Tests cleanup code

* Removed unused error message

* Updated tests

* MM-19614- Updated Marketplace Service error id (#13388)

* [MM-19610] Consume prepackaged plugins (#13005)

* consume prepackaged plugins into memory

* missing i18n

* remove spurious .gitignore changes

* return on failure to install prepackged plugins

* cleanup

* s/plugins/availablePlugins

* whitespace

* don't return extractDir when not needed

* s/plug/plugin

* error on icon, cleanup

* update armored version of testplugin signature

* honour AutomaticPrepackagedPlugins

* document getPrepackagedPlugin

* MM-19613 - Include prepackaged plugins in marketplace results (#13433)

* Added prepackaged plugins to marketplace results

* PR Feedback

* PR Feedback

* Update error where definition

* Removing unnecessary var declaration

* Updated comments

* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438)

* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint

* Call updateConfig before calling NewServer in TestHelper

* Added translations

* PR feedback

* Translations

* Feedback

* s/helpers.go/download.go

* Converging env.PrepackagedPlugins

* Initial PR feedback

* Ordered imports properly

* Updated DownloadURL to return slice of bytes

* Fixed method typo

* Fixed logging

* Added read lock for prepackaged plugins list

* PR Feedback

* Added condition to only install prepackaged plugin if it was previously enabled

* Linting

* Updated to check plugin state in config

* Closing filereader

* Only add local label if remote marketplace is enabled

* Updated local tag description

* Fixed tests

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-01-15 13:38:55 -05:00
Eli Yukelzon
e77ef9733c MM-20977 - Inviting multiple users with valid/allowed and inva… (#13372) 2020-01-14 15:29:50 +02:00
Hector
62b57143c8 [MM 19840] Create a Cache Interface abstraction to support multiple cache backends (#13384)
* Refactor to use structured logging

* Properly formatted with gofmt

* created interface Cache, but construction of cache is still coupled.

* Implementing cache factories to build caches

* Simple redis implementation without error handling. Keys and values by default are string

* refactor NewLocalCacheLayer to inject cache factory

* Removed redis impl to focus on cache abstraction

* CacheFactory injected on sqlsupplier and saved in Store struct

* remove useless private method

* replace concrete declaration of lru cache to cache abstraction

* discard spaces

* Renamed factory to provider because concrete implementations of factories may hold an state (such as a redis client for example)

* refactor to include all caches in the same package cache and subpackages

* method close cache. This method will be used for concrete implementations that need to release resources (close a connection, etc)

* closing cacheprovider and releasing resources while closing sql store

* fixed merge conflict fail

* gofmt files

* remove unused property from post_store

* naming refactor to avoid stutter. Added godocs on interface

* Store doesnt know anything about the cache and provider. Cache provider will be built after loading config and injected in localCacheLayer

* fixed broken test

* cache provider initialized before RunOldAppInitialization which initializes the localcachelayer

* move statusCache to server to initialize it with the new cache provider

* update terms_service and channel_layer to have new cacheProvider

* gofmt

* Add Connect method to the cache provider

* mock cacheprovider in user_layer_test

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-09 09:57:28 +01:00
Jesús Espino
092e53ace2 Fix inconsistencies in variable names for struct methods (#13561) 2020-01-07 10:47:03 +01:00
Scott Bishel
3bccc03df3 MM-19872: Update dependencies for enterprise implementation of new SAML2 golib. (#13298)
* Update dependencies for enterprise implementation of new SAML2 golib.

* add indirect
2019-12-19 08:27:34 -07:00
Hossein Ahmadian-Yazdi
de0672937c [MM-19422] Add SQL trace and LDAP trace output to both console and server logs (#13190)
* Add MLOG for sql store

* Update printf function

* Update store/sqlstore/supplier.go

Co-Authored-By: Martin Kraft <martin@upspin.org>

* Update go mod

* update go mod and tidy it up

* update vendor folder
2019-12-17 09:47:09 -05:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Christopher Speller
0907530528 MM-20608 Updating x/crypto to support ACMEv2 (#13201)
* Updating x/crypto to support ACMEv2

* Revert test code.
2019-11-27 09:56:31 -08:00
Miguel de la Cruz
f7e93db512 [MM-16768] Add support for Elasticsearch v7 (#12537)
* [MM-16768] Add support for Elasticsearch v7

* Fix i18n

* Adds external services tracking to the telemetry

* Rebuild elasticsearch interface mock

* Rename diagnostics keys

* Fix merge change
2019-11-21 13:04:21 +01:00
Carlos Tadeu Panato Junior
c2fbcd71d1 Update minio (#12979)
* update minio docker image to latest stable available on 31/10/2019

* update minio-go dependencies
2019-11-08 15:43:34 +01:00
Rajat Varyani
ac8e3a853c Add gorilla/handlers dependency as it is used in enterprise version (#12991)
* Add gorilla/handlers dependency as it is used in enterprise version

* Remove unused dependencies
2019-11-04 09:48:25 -08:00
Claudio Costa
422f377c96 [MM-19473] Fix data race on user login (#12870)
* Avoid writes to App.Session outside the app layer

* Fix merge

* Remove unneeded else condition
2019-10-31 12:50:43 +01:00
Carlos Tadeu Panato Junior
b3c0b5dd57 remove redis (#12918) 2019-10-29 15:05:54 +00:00
Jesús Espino
2f77622b89 Upgrading server package dependencies (#12559) 2019-10-02 20:13:38 +02:00
Christopher Speller
7966397f1f Defaulting to using go modules vendored (#12040) 2019-09-24 22:01:53 +02:00
Paulo Bittencourt
5b79fc4110 [MM-17889] Implement validation of plugin API version comments (#11941) 2019-09-17 08:03:28 +02:00
Jesús Espino
5cf578f486 Migrating to our ldap fork (#12149) 2019-09-12 21:11:05 +02:00
sowmiyamuthuraman
63552416fb Fix unable to access 'https://git.apache.org/thrift.git/' (#12146) 2019-09-10 15:20:35 -04:00
Claudio Costa
d2c3933c8e [MM-18033] Upgrade minio-go dependency (#12046)
* Upgrade minio-go dependency

* Update go.mod and go.sum
2019-09-10 09:43:51 +02:00
Christopher Speller
20825a1702 Updating dependencies. (#11680) 2019-07-29 07:39:56 -07:00
Claudio Costa
d844c52f06 MM-12389 Update segment library to v3 (#11472)
* Update analytics-go dependency

* Migrate from segment library v2 to v3

* Reinclude gorilla/handlers module

* Fix missing module

* Remove reference to outdated analytics module
2019-07-04 12:26:41 -07:00
Jesús Espino
6f0b2c52cf MM-16260: Upgrading goexif library (#11151) 2019-06-13 17:08:19 -04:00
Carlos Tadeu Panato Junior
0d0d758208 Update minio docker image and minio-go dependency (#10770)
* update minio server1

* update minio go lib to use the latest release
2019-04-30 07:47:41 -07:00
Harrison Healey
cbcfef25e5 MM-14574 Intercept log messages from local image proxy (#10668)
* MM-14574 Switch willnorris/imageproxy to fork

* MM-14574 Intercept log messages from local image proxy

* Revert "MM-14574 Switch willnorris/imageproxy to fork"

This reverts commit 046ab5c421.

* Update willnorris/imageproxy
2019-04-24 11:55:37 -04:00
Gabe Jackson
be4b473aee Move to the mattermost/go-i18n fork (#10669)
This change is being made to address an issue where the go-i18n
translation library would result in partial-translations when a
given language dictionary was missing a given plural keyword. The
improvement made here leads the translation library to try an
'other' keyword lookup if the first plural keyword fails to have
a value.

This change was not accepted upstream due to concern regarding
changing the behavior, so we are using a fork at this time to
address the issue.
2019-04-23 09:33:42 -04:00
Christopher Speller
41d117c37b MM-14617 Dependency upgrades and adding modules support. (#10517)
* Dependency upgrades and adding modules support.

* Commenting out file tests playload verification portion.

* Fixing viper.

* Fixing hclog.
2019-04-10 07:56:17 -07:00