Commit Graph
125 Commits
Author SHA1 Message Date
Lauri Ojansivu ad51a03731 Log in by full-page redirect by default with OAuth2/OIDC, Google & co, SAML and CAS.
Every login that chooses between a popup and a redirect opened a popup by
default. Google's sign-in pages, and other identity providers', can send
Cross-Origin-Opener-Policy, which makes Meteor's popup look closed at
once: the login was tried before the provider answered, and the user
was back on the sign-in page with no error. Popups are also blocked in
iframes and on some phones. The full-page redirect has no popup to lose.

- OAUTH2_LOGIN_STYLE (OAuth2/OIDC): redirect unless it says popup, in the
  server, the Admin Panel catalog and the samples.
- OAUTH_PROVIDERS_LOGIN_STYLE (Google, GitHub, Facebook, X, Meteor
  Developer, Weibo, Meetup): redirect by default, in the code, Dockerfile,
  snap, Sandstorm package and samples.
- SAML: both identity-provider profiles log in by redirect;
  SAML_LOGIN_FLOW=popup still chooses the popup, and the client no longer
  falls back to a popup while the configuration loads.
- CAS: redirects unless "popup": true. Its redirect could never finish:
  nothing called Meteor.initCas, which the package now does at startup.
  The sign-in page also passed username and password as loginWithCas's
  options and callback, so its callback never ran, and the CAS redirect
  page echoed the request address into HTML unescaped.

A redirect login's error now reaches the reloaded sign-in page, from
accounts-oauth's page-load hook and the SAML and CAS events, instead of
the page coming back silently.

Verified against a freshly built and prepared bundle with the local
identity-provider suite and no login style set: OIDC, SAML, CAS and all
seven Meteor providers log in by redirect, and each refusal is shown on
the sign-in page (31 of 31 with Chromium). Its LDAP wrong-password case
expected wording that changed in 679a8b3499 and is corrected.

Thanks to xet7 !
2026-10-08 15:18:59 +03:00
Lauri Ojansivu eb49a4b1b6 Override every login environment variable in Admin Panel / People.
Each login method has its own section: LDAP, OAuth2 (OpenID Connect and
Oracle OIM), CAS and Header login are new or complete, and the Login pane
gets PASSWORD_LOGIN_ENABLED and ACCOUNTS_COMMON_LOGIN_EXPIRATION_IN_DAYS.
models/lib/authConfigCatalog.js lists all 103 variables; server/lib/
authConfig.js resolves each one at run time (Admin Panel value first, then
the environment variable) for the app and, through
globalThis.__wekanAuthEnv, for the wekan-ldap, wekan-oidc and
wekan-accounts-cas packages. OAuth2 and CAS service configurations and LDAP
background sync are reapplied when their settings are saved.

Passwords and client secrets (LDAP_AUTHENTIFICATION_PASSWORD, OAUTH2_SECRET)
never reach the browser: the page learns only whether one is set and where
it comes from. Other values have credentials written inside a URL masked on
the server, and a URL field refuses them.

Fixed on the way:
- The Admin Panel LDAP overrides never applied. The bridge read Settings with
  a server-side findOne(), which Meteor 3 refuses; the error was swallowed and
  the environment used. The settings are now held in an observed cache.
- LDAP Test connection never existed on the server (testConnection.js was not
  imported) and used the synchronous Meteor.user().
- PROPAGATE_OIDC_DATA=false turned the feature on.
- CAS read only the misspelled CASE_VALIDATE_URL; CAS_VALIDATE_URL now works
  and the old name still does.
- snap help named three group-filter keys snap set does not know.

Every catalog variable is now listed in the Dockerfile, the docker-compose
files, snap config and help, and start-wekan.sh/.bat; 14 were missing.
tests/authConfigCatalog.test.cjs pins resolution, secrets, input validation,
platform coverage, and - across the whole tree - that no code reads a login
variable outside the catalog or straight from process.env, and that no
server code calls the synchronous Settings.findOne() or Meteor.user().
tests/playwright/specs/admin-login-env-overrides.e2e.js drives the pages.

Thanks to xet7 !
2026-10-05 19:48:48 +03:00
Lauri Ojansivu dc2e7592a3 Accept nested Active Directory groups in the LDAP group filter.
Since v12.08 (DirectoryGroupBleed) LDAP_USER_AUTHENTICATION=true logins check
LDAP_GROUP_FILTER_ENABLE, which they did not do before. The membership clause
(member=<user DN>) matches direct members only, so in Active Directory, where
access is granted through a team group nested in the access group, legitimate
users were refused, REST clients got 401, and the refusals were listed in
Admin Panel / Problems as ldap.group-denied.

LDAP_GROUP_FILTER_NESTED=true makes both group searches use AD's
LDAP_MATCHING_RULE_IN_CHAIN, (member:1.2.840.113556.1.4.1941:=<user DN>), so
the login filter and admin, role and org/team sync see nested membership. It
is off by default, and an attribute already written as the extensible match
is used as written. The user DN stays escaped, and a user who cannot be named
is still refused without a search.

Documented in LDAP.md with an upgrade note, and added to the Dockerfiles,
docker-compose files, snap config and start-wekan scripts.
tests/ldapNestedGroups.test.cjs drives isUserInGroup and getUserGroups with and
without the setting, and checks that every member clause in ldap.js goes through
groupMemberClause.

Thanks to rmb82 and xet7 !

Fixes #6744.
2026-10-05 18:53:52 +03:00
Lauri Ojansivu daf6593adf Verify LDAP server certificates by default.
The Docker image and the snap set LDAP_REJECT_UNAUTHORIZED=false, so an
LDAPS or StartTLS server certificate was not verified unless an admin
changed it, and an empty value disabled verification too. The default is
true everywhere now, and only the exact value false turns it off; a
self-signed or private CA belongs in LDAP_CA_CERT.

Thanks to xet7 !
2026-10-02 14:22:17 +03:00
Lauri Ojansivu d6503b43f5 Choose which SAML signatures are required and log in by full-page redirect.
SAML 2.0 lets an identity provider sign the Response, the Assertion or
both. WeKan always required a signed Response (node-saml's default, never
overridden), so an identity provider that signs only the Assertion was
rejected with "Invalid document signature" before the Assertion was
checked. Admin Panel -> People -> SAML now has SAML_IDP_PROFILE: standard,
which keeps the previous behaviour, or signed-assertion-redirect, which
requires the Assertion signature instead and logs in by full-page redirect.
SAML_WANT_RESPONSE_SIGNED, SAML_WANT_ASSERTIONS_SIGNED and SAML_LOGIN_FLOW
can each be set on their own; left at Default they follow the profile. A
configuration requiring neither signature is refused, and validation
errors now reach the administrator instead of "Internal server error".

In redirect mode the ACS stores the validated profile under the random
credential token and redirects to /sign-in?samlToken=; the page exchanges
it and opens /. The assertion never enters the address. The token is
remembered in the tab that started the login, and a samlToken that tab did
not start is not exchanged, so a link cannot sign a browser into another
account. Errors return as samlError and are shown on the sign-in page.

A test signs responses with a throwaway key and runs them through the
shipped node-saml; browser tests log in through the fixture identity
provider in both flows. The new message is English, pending Transifex.

Thanks to xet7 !
2026-09-29 13:57:51 +03:00
Lauri Ojansivu 05f1f0a032 Add SAML administration, metadata and service-provider logout
Provide shared catalog-driven settings controls with environment fallback, live admin overrides, platform configuration and regression coverage. Document the remaining live identity-provider validation requirement.

Thanks to xet7 !
2026-09-25 12:45:30 +03:00
Lauri Ojansivu 5ed9fc944a Remove obsolete Summernote integration and editor configuration.
Use the Markdown textarea for every editor. Remove the retired environment and Snap options from server settings, all platform launchers, build scripts and current documentation. Keep released and archived changelog entries intact.

Keep notification HTML escaping independent of editor configuration, preserve attachment metadata and mention behavior, and cover Markdown and emoji round trips in browser tests. Also import the translator used by attachment error handlers.

Thanks to xet7 !
2026-09-19 14:32:29 +03:00
Lauri Ojansivu 61806605fc Add the Meteor accounts login providers and passwordless login to every platform's settings.
OAUTH_GOOGLE_*, OAUTH_GITHUB_*, OAUTH_FACEBOOK_*, OAUTH_TWITTER_*,
OAUTH_METEOR_DEVELOPER_*, OAUTH_WEIBO_*, OAUTH_MEETUP_*,
OAUTH_PROVIDERS_LOGIN_STYLE, OAUTH_PROVIDERS_MERGE_EXISTING_USERS and
PASSWORDLESS_ENABLED are now documented, commented out or defaulted, in
every place the OAUTH2_* and SAML_* settings already are: docker-compose.yml
and its FerretDB v1 / v2 and MongoDB variants, the Dockerfiles' ENV block,
start-wekan.sh, start-wekan.bat, the Snap config (keys list plus
DESCRIPTION_/DEFAULT_/KEY_ triples) and wekan-help, the Sandstorm package
definition, the stacksmith Docker-secrets reader and secrets/README.md.
The comments name the callback URL to register at each provider,
<ROOT_URL>/_oauth/<service>, and say that Admin Panel / People / Login
overrides the environment.

New docs pages docs/Features/Login/OAuth-Providers.md and Passwordless.md,
linked from the docs index. tests/oauthProvidersPlatformEnv.test.cjs pins
that every variable is present on every platform and that the docs exist
and are linked.

Thanks to xet7 !
2026-09-11 11:50:30 +03:00
Lauri Ojansivu 5cc9b1dcbb Docker: add "Build from source & start" menu action; remove obsolete compose version: attribute
Add a "Build from source & start (up -d --build)" action to the Docker
menus in rebuild-wekan.sh and rebuild-wekan.bat. It builds the wekan-app
image from the local Dockerfile, tags it as the image the chosen compose
file references (ghcr.io/wekan/wekan:latest), and starts that freshly
built container instead of a possibly-stale prebuilt image pulled from
the registry - useful when a source change (e.g. the FerretDB
Version-page detection) is not in the pulled image yet.

Remove the obsolete top-level "version:" attribute from all docker
compose files, which Docker Compose v2 warns about and ignores:
docker-compose.yml, docker-compose-ferretdb-v2-postgresql.yml,
docker-compose-multitenancy.yml, .devcontainer/docker-compose.yml, and
docs/Databases/ToroDB-PostgreSQL/docker-compose.yml.

Thanks to xet7 !
2026-07-11 11:52:03 +03:00
Lauri OjansivuandClaude Opus 4.8 b181889a56 Fix ProxyBleed (GHSA-jggc-qvfc-jr6x): header-login X-Forwarded-For allowlist bypass
Derive the header-login source IP from the real TCP socket peer instead of the
spoofable X-Forwarded-For header, fail closed when the trusted-IP allowlist is
unset, and add opt-in multi-proxy support via HEADER_LOGIN_TRUSTED_PROXIES
(honor XFF only from a trusted proxy peer, taking the right-most untrusted hop).
Propagate the new env vars across docker-compose, start-wekan.sh/.bat, Dockerfile,
.devcontainer, snap config and the virtualbox script; add docs and regression tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 12:54:59 +03:00
Lauri Ojansivu 03e0cfdc15 Try to fix Docker and Snap.
Thanks to xet7 !
2026-04-03 20:35:54 +03:00
Martin Filser c76959ff25 Dragscroll possible, scroll the screen with the mouse at desktop view
- click on a empty list area and drag the view left/right to scroll
2024-08-03 19:45:45 +02:00
Lauri Ojansivu 79e2001708 Update Docker base images to Ubuntu 24.04.
Thanks to xet7 !
2024-06-03 03:06:58 +03:00
Martin Filser cc1ca4a1bb Dockerfile for production and development same build (part 2) 2024-05-26 19:55:19 +02:00
Martin Filser c8b1ef8ea6 Dockerfile for production and development same build (part 1) 2024-05-26 19:49:31 +02:00
Martin Filser 2b4f4c8d4d .devcontainer/Dockerfile, updated RUN statements to heredoc style 2024-05-25 19:53:33 +02:00
Martin Filser 68104fe578 .devcontainer/Dockerfile, use Debian 11 because Ubuntu 21.10 can not build 2024-05-25 19:53:33 +02:00
Martin Filser 6f2c46a747 .devcontainer/Dockerfile, make is needed by "meteor npm update" 2024-05-25 19:53:30 +02:00
Martin Filser e7e1f1b667 .devcontainer/Dockerfile, don't remove ca-certificates because it's needed for "meteor npm install" 2024-05-25 19:53:25 +02:00
Martin Filser 7dc20616a7 .devcontainer/Dockerfile, don't remove curl/python3 because it's needed for "meteor npm" 2024-05-25 19:53:20 +02:00
Martin Filser b5b323000a .devcontainer/Dockerfile, reduce build a bit + image size to 3.42 GB
- on a test system it reduced from 11m36s to 9m34s
2024-05-25 19:53:07 +02:00
Martin Filser 19d204c7a8 .devcontainer/Dockerfile, 3.49 GB image size 2024-05-25 19:50:16 +02:00
Martin Filser 672c279b0a .devcontainer/Dockerfile, 4.12 GB image size 2024-05-25 19:50:16 +02:00
Martin Filser 669e31ea64 .devcontainer/Dockerfile, 4.16 GB image size 2024-05-25 19:50:16 +02:00
Martin Filser 4ab72170e3 .devcontainer/Dockerfile, 4.16 GB image size 2024-05-25 19:50:16 +02:00
Martin Filser 9ca39696b3 .devcontainer/Dockerfile, 5.64 GB image size
- first copy all files, then install to make it possible to install everything
  in one RUN section
2024-05-25 19:50:16 +02:00
Martin Filser 7c36279308 .devcontainer/Dockerfile, 5.64 GB image size 2024-05-25 19:50:16 +02:00
Martin Filser 89e5b3a979 .devcontainer/Dockerfile, 6.02 GB image size 2024-05-25 19:50:14 +02:00
Martin Filser 58782c9a89 .devcontainer/Dockerfile contained duplicated logic 2024-05-25 19:49:30 +02:00
Martin Filser c3824dcbd2 .devcontainer, added missing environments 2024-05-25 19:49:30 +02:00
Lauri Ojansivu 93be112a94 Azure AD B2C login using OAuth2. https://github.com/wekan/wekan/wiki/B2C
Thanks to snowsky and xet7 !

Fixes #5242
2023-12-17 13:54:55 +02:00
Lauri Ojansivu a781c0e7dc Added DEFAULT_BOARD_ID environment variable setting to all WeKan platforms.
Thanks to xet7 !
2023-08-23 06:27:06 +03:00
Lauri Ojansivu 9f6e6bdc81 Upgrade to Node.js 14.21.4 at build scripts and remaining Docker containers.
Thanks to Meteor and xet7 !
2023-08-02 06:58:45 +03:00
Lauri Ojansivu dd6e7372b7 Updated to Node.js v14.21.3. Thanks to Node.js developers. 2023-02-18 01:21:28 +02:00
Lauri Ojansivu b5d35d4645 Back to MongoDB 6.x
Thanks to urmel1960 and xet7 !

Fixes #4824
2023-02-10 12:29:09 +02:00
Lauri Ojansivu 1733203f8e Try MongoDB 5, shell and tool.
Thanks to xet7 !
2023-02-02 14:48:04 +02:00
Lauri Ojansivu 161b20834f Merge branch 'master' into feature-s3 2022-12-24 11:52:03 +02:00
Lauri Ojansivu f22fe5497b Upgrade to MongoDB 6.0.3. Part 2.
Thanks to MongoDB developers!
2022-12-24 11:00:02 +02:00
Lauri Ojansivu 21e2eabd60 Store files to S3. In Progress.
Thanks to xet7 !

Related #142
2022-12-21 23:48:47 +02:00
Lauri Ojansivu 689e37e434 Updated to Node.js v14.21.2. Thanks to Node.js developers. 2022-12-14 19:13:10 +02:00
Lauri Ojansivu 57c09e15ac Revert max_old_space_size and stack-size. Update markdown-it-mermaid and cli-table3.
Thanks to xet7 !
2022-11-22 00:48:45 +02:00
Lauri Ojansivu 20e3282edd Updated to Node.js v14.21.1. Thanks to Node.js developers. 2022-11-05 02:46:25 +02:00
Lauri Ojansivu d710168cfa Updated to Node.js v14.21.0. Thanks to Node.js developers. 2022-11-02 16:52:25 +02:00
Lauri Ojansivu ccf4f59430 Updated to Node.js v14.20.1. Thanks to Node.js developers. 2022-09-26 21:52:14 +03:00
Tobias Wolf c64a221453 Add support to validate uploaded avatars 2022-08-20 08:46:41 +02:00
Tobias Wolf b5d311c00c Add support to validate attachment uploads by an external program 2022-08-15 21:09:46 +02:00
Tobias Wolf ed3223fedc Add support to validate attachment uploads by type and size 2022-08-03 13:06:23 +02:00
Lauri Ojansivu 239dd1a341 Updated to Node.js v14.20.0. Thanks to Node.js developers. 2022-07-08 10:10:34 -04:00
Lauri Ojansivu 6c8563d02f Updated to Node.js v14.19.3. Thanks to Node.js developers. 2022-05-21 04:29:30 +03:00
Lauri Ojansivu 907013228d Updated to Node.js v14.19.2. Thanks to Node.js developers. 2022-05-16 21:22:16 +03:00