Commit Graph
15 Commits
Author SHA1 Message Date
4db0023a04 Cherry pick of: Update go version to 1.25.9 (#36357) (#36358)
(cherry picked from commit 035c3ba4b9)

Co-authored-by: Christopher Poile <cpoile@gmail.com>
2026-05-01 13:04:16 -04:00
Harshil SharmaandGitHub baea603c40 Updated sharedchannel test package dependencies to match those in server (#36055) 2026-04-14 08:47:52 -04:00
71ca373de7 Generate instead of hard-coding test passwords, enforce new minimum for FIPS, shard CI, fix FIPS builds (#35905)
* Replace hardcoded test passwords with model.NewTestPassword()

Add model.NewTestPassword() utility that generates 14+ character
passwords meeting complexity requirements for FIPS compliance. Replace
all short hardcoded test passwords across the test suite with calls to
this function.

* Enforce FIPS compliance for passwords and HMAC keys

FIPS OpenSSL requires HMAC keys to be at least 14 bytes. PBKDF2 uses
the password as the HMAC key internally, so short passwords cause
PKCS5_PBKDF2_HMAC to fail.

- Add FIPSEnabled and PasswordFIPSMinimumLength build-tag constants
- Raise the password minimum length floor to 14 when compiled with
  requirefips, applied in SetDefaults only when unset and validated
  independently in IsValid
- Return ErrMismatchedHashAndPassword for too-short passwords in
  PBKDF2 CompareHashAndPassword rather than a cryptic OpenSSL error
- Validate atmos/camo HMAC key length under FIPS and lengthen test
  keys accordingly
- Adjust password validation tests to use PasswordFIPSMinimumLength
  so they work under both FIPS and non-FIPS builds

* CI: shard FIPS test suite and extract merge template

Run FIPS tests on PRs that touch go.mod or have 'fips' in the branch
name. Shard FIPS tests across 4 runners matching the normal Postgres
suite. Extract the test result merge logic into a reusable workflow
template to deduplicate the normal and FIPS merge jobs.

* more

* Fix email test helper to respect FIPS minimum password length

* Fix test helpers to respect FIPS minimum password length

* Remove unnecessary "disable strict password requirements" blocks from test helpers

* Fix CodeRabbit review comments on PR #35905

- Add server-test-merge-template.yml to server-ci.yml pull_request.paths
  so changes to the reusable merge workflow trigger Server CI validation
- Skip merge-postgres-fips-test-results job when test-postgres-normal-fips
  was skipped, preventing failures due to missing artifacts
- Set guest.Password on returned guest in CreateGuestAndClient helper
  to keep contract consistent with CreateUserWithClient
- Use shared LowercaseLetters/UppercaseLetters/NUMBERS/PasswordFIPSMinimumLength
  constants in NewTestPassword() to avoid drift if FIPS floor changes

https://claude.ai/code/session_01HmE9QkZM3cAoXn2J7XrK2f

* Rename FIPS test artifact to match server-ci-report pattern

The server-ci-report job searches for artifacts matching "*-test-logs",
so rename from postgres-server-test-logs-fips to
postgres-server-fips-test-logs to be included in the report.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-08 16:49:43 -03:00
4d20645a5b Inline mattermost-govet into the monorepo (#35869)
* inline mattermost-govet

* fix style issues

* simplify the openApiSync spec test

* README.md tweaks

* fix missing licenses

* simplify README.md

* trigger server-ci on tools/mattermost-govet/**

* Apply https://github.com/mattermost/mattermost-govet/commit/470cf78253f0aa85a4f4b5b50002682bf823e729

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-01 13:24:22 +00:00
Carlos GarciaandGitHub fd2dd1c618 updated go to version 1.25.8 (#35817)
* updated go to version 1.25.8

* updated gotestsum version to work with go 1.25.8

go 1.25 does not work with indirect tools 0.11 dependency pulled by
gotestsum.

* Use sync.WaitGroup.Go to simplify goroutine creation

Replace the wg.Add(1) + go func() { defer wg.Done() }() pattern with
wg.Go(), which was introduced in Go 1.25.

* pushes fips image on workflow dispatch to allow fips test to run on go version update

* fix new requirements for FIPS compliance imposed on updating to go 1.25.8

* updates openssl symbol check for library shipped with FIPS new versions

go-openssl v2 shipped with FIPS versions starting from 1.25 uses mkcgo to generate
bindings causing symbol names to be different.

* removes temp workflow-dispatch condition

* keep versions out of agents md file
2026-03-27 21:11:52 +01:00
Doug LauderandGitHub 85dcb8b9e7 MM-67944: Add shared channel integration test tool (#35639)
* Add shared channel integration test tool (MM-67944)

  Add tools/sharedchannel-test, a standalone Go tool that validates shared
  channel synchronization between two real Mattermost Enterprise instances.
  The tool builds and manages two server processes with separate databases,
  establishes a remote cluster connection, and runs integration tests for
  membership, post, and reaction sync.

  Test coverage:
  - Membership: add, remove, re-add, bulk remove
  - Posts: create, edit, delete
  - Reactions: add, remove

  Uses mlog with dual console targets (stdout for info, stderr for errors)
  and exits non-zero on failure for CI integration.
2026-03-25 11:53:56 -04:00
Nick MisasiandGitHub 3b250ba5c4 Add support for make i18n-extract when dep folders are symlinked (#34385) 2025-11-04 16:18:24 +02:00
Ben SchumacherandGitHub 166a676fe5 Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
Agniva De SarkerandGitHub 59998b0b84 Bubble up parsing error from en.json (#27362)
Running `make i18n-extract` on a en.json file
with bad JSON will just wipe off all keys instead
of throwing the error. This is very confusing
and can lead to a lot of time wasted because
there's no indication that the JSON is incorrect.

Fixing this.

```release-note
NONE
```
2024-06-26 20:27:22 +05:30
Colton ShawandGitHub 1530228308 MM-54569 : Update maximum password length on UI to 72 characters (#26699) 2024-04-17 11:33:55 +00:00
82b8d4dc07 MM-55966 - Update ArrayFromJSON to use LimitedReader (#25510)
* update ArrayFromJSON to use LimitedReader

* update for bad merge

* fix lint errors

* update test code

* update unit tests

* update unit tests

* fix unit tests

* use consts, other cleanup

* add non sorting duplicate check

* set config to default value, then config setting if available

* fix lint errors

* fixes and debugs

* fix log test

* remove setting from Client, add unlimited Parser to client

* a couple more fixes

* another fix

* rename some variables

* remove superflous call

* check for valid MaximumPayloadSize

* update language file

* fix for e2e-tests

* update util function to return error

* lint fix

* update config property name to include unit

* fix for unit test

* add new config to telemetry

* call function to create LimitedReader

* Deprecate old function, use new function name

* return new AppError on failed parse

* return new AppError on failed parse

* return new AppError on failed parse

* add constant for i18n valid constants

* Update server/public/model/utils_test.go

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* Apply suggestions from code review

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* update error variable, remove unnecessary check

* Update function names

* fix errors from merge

* update unit test to create unique ids

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
2024-01-09 10:04:16 -07:00
2ff946e79b chore: remove deprecated "io/ioutil" imports (#25119)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2023-11-16 12:15:30 +01:00
a25aa43667 integrating WIP-languages (#24683)
* integrating WIP-languages

* handle malformed, but "correct" empty i18n files

---------

Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2023-10-03 22:56:23 -03:00
Ibrahim Serdar AcikgozandGitHub 0e84ccb383 Bump Go version to v1.20 (#24439) 2023-09-07 13:06:18 +03:00
Ibrahim Serdar AcikgozandGitHub 38fd8cd6aa tools/mmgotool: move into monorepo (#24010) 2023-07-17 16:15:58 +03:00