Commits on Source (86)
-
Penar Musaraj authoredUnverified1ec50479
-
Penar Musaraj authoredUnverified89e6a083
-
Kyle Zhao authored627d1690
-
Aljaž Srebrnič authored
The name of the attribute that contains the user's groups should be changeable. Ipsilon IdP for example uses just 'groups', and that is hardcoded.
6cede657 -
Vinoth Kannan authored091166c2
-
Kyle Zhao authorede4a0a686
-
Vinoth Kannan authored10c08b7a
-
Allen Hancock authoredea14706d
-
Allen Hancock authored0b1e951e
-
Vinoth Kannan authored4b7dff47
-
Vinoth Kannan authoredf390613f
-
Vinoth Kannan authoredc6c05a62
-
Vinoth Kannan authored
c6c05a62
ae11fbed -
Vinoth Kannan authored5651b590
-
Vinoth Kannan authored6695d561
-
Bernhard Suttner authored778438cb
-
Bernhard Suttner authored2d164f1a
-
Bernhard Suttner authored08ae85df
-
Bernhard Suttner authored
* RFC: groups full sync * Update lib/saml_authenticator.rb Co-Authored-By:
Robin Ward <robin.ward@gmail.com> * Update lib/saml_authenticator.rb Co-Authored-By:
Robin Ward <robin.ward@gmail.com> * Update README.md Co-Authored-By:
Robin Ward <robin.ward@gmail.com>
1a7bf2bb -
Allen Hancock authored0fcacc86
-
Bernhard Suttner authoreda8488387
-
Vinoth Kannan authored1a6c3e82
-
Rafael dos Santos Silva authoredUnverified29537d5b
-
Vinoth Kannan authoredc6bdf9ed
-
discoursehosting authored
* Support for GlobalSetting.saml_base_url * Push file with class method... Co-authored-by:
Richard <richard@discoursehosting.com>
Unverified2e0293fe -
Robin Ward authored035932c8
-
Robin Ward authoredd89ab6ab
-
Robin Ward authored
This makes sure the saml_request can only insert strings into the HTML form.
dcce8d3e -
Bernhard Suttner authored
In case the user isn't assigned to any (non-automatic) group, the user wasn't added.
Unverified8c729d63 -
p-betula authoredUnverified230a58b2
-
Vinoth Kannan authoredUnverifieda6e2c214
-
David Taylor authored
These were removed from core in https://github.com/discourse/discourse/commit/d2bceff133ac152678a1407d45fea260a0fe8536
Unverifieda4a101aa -
Vinoth Kannan authored
Now we can sync or create user fields based on the new `saml_user_field_statements` environment variable's mapping.
Unverified488fa37e -
Vinoth Kannan authoredUnverifiedc08ae1e0
-
Roman Rizzi authored
We started seeing [this error](https://github.com/onelogin/ruby-saml/issues/577) on some of our sites, which has been fixed on 1.12.1.
Unverified9d836281 -
Vinoth Kannan authored
Recent commit 9d836281 is not compatible with old versions of Discourse.
Unverified71f2e2d8 -
Vinoth Kannan authored
Our hosted sites running in stable branch have issues with `rexml` gem and returning "missing gem" error.
Unverified3aeea41e -
Andreas Teuber authored
If your IDP transmits `cn=groupname,cn=groups,dc=example,dc=com` you can set this to true to use only `groupname`. This is useful if you want to keep the standard group name length of Discourse (20 characters). Co-authored-by:
Andreas Teuber <andreas.teuber@passiv.de>
Unverified19d76b0b -
Bastien Le Querrec authored
Co-authored-by:
Bastien Le Querrec <blq@laquadrature.net>
Unverifiedbd02343f -
David Taylor authored
The styling no works with Discourse's current login UI, so let's remove it. The OnceOff job was to migrate from an old data format more than 4 years ago. It's exceptionally unlikely that anyone is going to upgrade from such an old version. If they do, they could still extract the data manually and migrate it.
fb96faba -
David Taylor authoredae6a93f5
-
David Taylor authored6321ca5e
-
David Taylor authored8f43b51e
-
David Taylor authored8002759d
-
David Taylor authoredUnverifiedd5001ba6
-
David Taylor authored
For `name`, the previous intention was to use the `fullName` attribute, and then fallback to "firstname lastname". However, a bug in the implementation meant that the `fullName` was skipped. This commit updates the logic to lean on omniauth-saml's attribute_statements for the fullName, firstName and lastName attributes, and also updates the priority logic so that fullName is indeed prioritized.
Unverified9b079332 -
David Taylor authored
This will allow much easier testing of the strategy, and is one more step towards making the SAML plugin multisite-compatible
Unverified12cae03c -
David Taylor authored
Putting this logic into the omniauth strategy is much cleaner because: - we no longer need a Rails controller and the associated `custom_url` parameter - we can re-use the `authn_request` instance which is automatically generated by the omniauth strategy, rather than re-implementing that logic - the behavior is decided at runtime, rather than during initialization. This makes it testable, and is another step on the way to making the plugin multisite-compatible This commit also introduces a spec for the feature.
Unverified95ccea3f -
David Taylor authored
This means that the name/title can be set per-site and per-locale. This change is backwards-compatible - any existing sites which have configured the GlobalSettings will use those cluster-wide.
Unverifiedf0a76061 -
David Taylor authored
This centralises our logic for accessing settings. This particular commit should be a no-op. I intend to followup with the new site setting definitions in a future commit.
Unverified44b4e111 -
David Taylor authored
The prefix is added by the helper. Adding it here causes it to be prefixed twice.
Unverified6209fc90 -
David Taylor authored
SAML flows end in a cross-site POST back to Discourse. We have the SameSite=lax attributes on our session cookies so this cross-site POST request has no cookies, and therefore we are unable to check any values in the `session`. This commit makes the browser re-submit the POST request in a SameSite context (i.e. with cookies). Upon receiving a cross-site POST, it renders a simple HTML form with some auto-submit JS. This form submits exactly the same data to the same URL, but this time the request will include the cookies, and authentication can complete properly
Unverifiedd137e981 -
David Taylor authored
Follow-up to d137e981. If the cross-site POST returns a Set-Cookie header, it will overwrite the existing session, and we'll lose the redirect URL. This commit instructs rack not to persist a session cookie in this response.
Unverified720269dd -
David Taylor authored
GlobalSettings configured via environment variables will continue to take precendence, so this change is backwards compatible. - `.presence` is added to string values, since 'unset' site settings are never `nil` - saml_force_domains is split on `|` and `,` because site settings expect a `|`, while the old global setting expected a `,` - Specs are migrated to use SiteSettings, because GlobalSettings do not override SiteSettings in test mode
e9f9150b -
David Taylor authoredf42577cb
-
David Taylor authored
Regression introduced in e9f9150b
Unverified2cc216cd -
David Taylor authored
Core takes care of suggesting usernames during normal signup. Suggesting them here as well can cause unexpected issues (e.g. when staged users sign up). The SAML plugin currently has a bespoke `auto_create_account` implementation, which **does** need to do its own username suggestion. Therefore this commit moves all the suggestion logic into `auto_create_account`. An integration spec for staged-user signup is also introduced.
Unverified4e0a5e0a -
David Taylor authored
Some variable renames were missed, and some specs are no longer relevant
Unverified6c46c776 -
David Taylor authoredUnverifieddbca5ca9
-
David Taylor authored
The SAML spec requires compression for the standard Redirect binding. However, it is not used in the POST binding. This regressed during the refactoring of 95ccea3f
Unverified792a51c9 -
David Taylor authored
In the vast majority of cases, this wasn't causing a problem because browsers will auto-detect the content-type. However, if any intermediate proxies add the `X-Content-Type-Options: nosniff` header, then the html will be displayed as plain text, and login will be broken.
Unverified21a23caa -
David Taylor authored
The change in 245b70d4 means that the CSP middleware now activates for the `/auth/saml` route. That's good, but it also broke things for subfolder installations because the CSP includes the base_path, while the SAML script path did not. This commit fixes that, and adds an integration spec to ensure the script is included in the script_src directive for regular and subfolder sites.
Unverified7792d1eb -
discoursebot authored
Co-authored-by:
CvX <CvX@users.noreply.github.com>
Unverified851f6ceb -
David Taylor authoredUnverified6a9fa629
-
Andrei Prigorshnev authored
Starting from https://github.com/discourse/discourse/commit/c2022521906b3c44a8a21e8eb2527c8650e06a18 we can pass to `UsernameSuggester` an array of inputs parameters and it'll be skipping invalid items and trying next ones.
Unverified3b5f7440 -
David Taylor authored
There is only one SAMLAuthenticator instance per-process. Storing user-specific state in it is risky (although, in our default unicorn-based config, is unlikely to cause issues because we only handle one concurrent request per process). This commit also updates our implementation to use the built-in `#single` and `#multi` methods provided by the SAML gem. This avoids the need for our custom `&.first`, `&.split` and `&.join` implementation.
Unverifiedb486bfdb -
David Taylor authored
All data will be automatically migrated from `oauth2_user_infos` to the `user_associated_accounts` table
Unverified1d8bfdb6 -
David Taylor authored
In production, the SAML omniauth strategy returns some very complex data structures in the `extra` data. These have circular references, and can cause a "stack level too deep" error when serializing to JSON. This commit simplifies thing so we only try to store the attributes hash.
Unverifiedf6279c56 -
David Taylor authored
`name` is nil... so this logic was not working at all
Unverified3d1f5fa3 -
discoursebot authored
Co-authored-by:
discoursebuild <build@discourse.org>
Unverifieda17d51e2 -
David Taylor authoredUnverified6c292c77
-
Andrei Prigorshnev authoredUnverified88054bda
-
discoursebot authored
Co-authored-by:
discoursebuild <build@discourse.org>
Unverifieddbaca5df -
Jarek Radosz authoredUnverifieda827f4cb
-
discoursebot authored
* DEV: Update CI workflows * DEV: Update CI setup * prettier Co-authored-by:
discoursebuild <build@discourse.org> Co-authored-by:
Jarek Radosz <jradosz@gmail.com>
Unverified6e4507a5 -
discoursebot authored
Co-authored-by:
discoursebuild <build@discourse.org>
Unverifiede095be11 -
David Taylor authored
* DEV: Bump rubocop-discourse * Fix rubocop violations
Unverifiede43b770c -
discoursebot authored
Co-authored-by:
discoursebuild <build@discourse.org>
Unverified79f52a7a -
Vinoth Kannan authored
This commit already added in a brach and deployed to a client before. https://github.com/discourse/discourse-saml/commit/ddeb2615529eb0f9cac9621e247feebf31e65fee
Unverifiedc25ec3bd -
Vinoth Kannan authored
And add a option to add multiple certificates in site setting with "|" separator.
Unverified128f4e75 -
David Taylor authoredUnverified6812408a
-
dependabot[bot] authored
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.2 ) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by:
dependabot[bot] <support@github.com> Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Unverifieda2c69c11 -
David Taylor authoredUnverified333b5787
-
discoursebot authored
Co-authored-by:
discoursebuild <build@discourse.org>
Unverified49afe4d6 -
Davide Depau authored05b7cdc8
-
Davide Depau authoredf2dff4f6
Showing
- .discourse-compatibility 4 additions, 0 deletions.discourse-compatibility
- .eslintrc 3 additions, 0 deletions.eslintrc
- .github/workflows/discourse-plugin.yml 11 additions, 0 deletions.github/workflows/discourse-plugin.yml
- .gitignore 3 additions, 3 deletions.gitignore
- .prettierrc 1 addition, 0 deletions.prettierrc
- .rubocop.yml 2 additions, 0 deletions.rubocop.yml
- .streerc 2 additions, 0 deletions.streerc
- .template-lintrc.js 4 additions, 0 deletions.template-lintrc.js
- Gemfile 8 additions, 0 deletionsGemfile
- Gemfile.lock 48 additions, 0 deletionsGemfile.lock
- LICENSE 0 additions, 1 deletionLICENSE
- README.md 39 additions, 6 deletionsREADME.md
- app/jobs/onceoff/migrate_saml_user_infos.rb 0 additions, 19 deletionsapp/jobs/onceoff/migrate_saml_user_infos.rb
- assets/stylesheets/saml.scss 0 additions, 3 deletionsassets/stylesheets/saml.scss
- config/locales/client.en.yml 11 additions, 0 deletionsconfig/locales/client.en.yml
- config/locales/server.en.yml 60 additions, 0 deletionsconfig/locales/server.en.yml
- config/settings.yml 89 additions, 0 deletionsconfig/settings.yml
- db/migrate/20211230141200_migrate_saml_user_info.rb 31 additions, 0 deletionsdb/migrate/20211230141200_migrate_saml_user_info.rb
- lib/discourse_saml/saml_omniauth_strategy.rb 79 additions, 0 deletionslib/discourse_saml/saml_omniauth_strategy.rb
- lib/saml_authenticator.rb 303 additions, 139 deletionslib/saml_authenticator.rb
.discourse-compatibility
0 → 100644
.eslintrc
0 → 100644
.github/workflows/discourse-plugin.yml
0 → 100644
.prettierrc
0 → 100644
.rubocop.yml
0 → 100644
.streerc
0 → 100644
.template-lintrc.js
0 → 100644
Gemfile
0 → 100644
# frozen_string_literal: true | |||
source "https://rubygems.org" | |||
group :development do | |||
gem "rubocop-discourse" | |||
gem "syntax_tree" | |||
end |
Gemfile.lock
0 → 100644
assets/stylesheets/saml.scss
deleted
100644 → 0
config/locales/client.en.yml
0 → 100644
config/settings.yml
0 → 100644
lib/discourse_saml/saml_omniauth_strategy.rb
0 → 100644