Skip to content
Snippets Groups Projects
Unverified Commit 6e4507a5 authored by discoursebot's avatar discoursebot Committed by GitHub
Browse files

DEV: Update CI workflows (#70)


* DEV: Update CI workflows
* DEV: Update CI setup
* prettier

Co-authored-by: default avatardiscoursebuild <build@discourse.org>
Co-authored-by: default avatarJarek Radosz <jradosz@gmail.com>
parent a827f4cb
No related branches found
No related tags found
No related merge requests found
......@@ -50,10 +50,7 @@ jobs:
- name: Ember template lint
if: ${{ always() }}
run: |
if [ 0 -lt $(find assets/javascripts -type f -name "*.hbs" 2> /dev/null | wc -l) ]; then
yarn ember-template-lint assets/javascripts
fi
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts
- name: Rubocop
if: ${{ always() }}
......
auto_generated
gems
.DS_Store
node_modules
/gems
/auto_generated
......@@ -3,35 +3,40 @@ GEM
specs:
ast (2.4.2)
parallel (1.22.1)
parser (3.1.1.0)
parser (3.1.2.0)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.2.1)
regexp_parser (2.5.0)
rexml (3.2.5)
rubocop (1.26.1)
rubocop (1.30.1)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.16.0)
rubocop-ast (1.18.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.9.0)
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
PLATFORMS
arm64-darwin-20
ruby
x86_64-darwin-18
x86_64-darwin-19
x86_64-darwin-20
x86_64-linux
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.1.4
2.3.10
......@@ -39,6 +39,7 @@ Add the following settings to your `discourse.conf` file:
- `saml_target_url`
### Group sync
- `DISCOURSE_SAML_SYNC_GROUPS`: Sync groups. Defaults to false.
- `DISCOURSE_SAML_GROUPS_ATTRIBUTE`: SAML attribute to use for group sync. Defaults to `memberOf`
- `DISCOURSE_SAML_GROUPS_FULLSYNC`: Should the assigned groups be completely synced including adding AND removing groups based on the IDP? Defaults to false. If set to true, `DISCOURSE_SAML_SYNC_GROUPS_LIST` and SAML attribute `groups_to_add`/`groups_to_remove` are not used.
......@@ -58,14 +59,13 @@ Add the following settings to your `discourse.conf` file:
- `DISCOURSE_SAML_VALIDATE_EMAIL_FIELDS`: defaults to blank. This setting accepts pipe separated group names that are supplied in `memberOf` attribute in SAML payload. If the group name specified in the value matches that from `memberOf` attribute than the `email_valid` is set to `true`, otherwise it defaults to `false`. This setting overrides `DISCOURSE_SAML_DEFAULT_EMAILS_VALID`.
- `DISCOURSE_SAML_BUTTON_TITLE`: 'with SAML'
- `DISCOURSE_SAML_TITLE`: 'SAML'
- `DISCOURSE_SAML_SYNC_MODERATOR`: defaults to false. If set to `true` user get moderator role if SAML attribute `isModerator` (or attribute specified by `DISCOURSE_SAML_MODERATOR_ATTRIBUTE`) is 1 or true.
- `DISCOURSE_SAML_SYNC_MODERATOR`: defaults to false. If set to `true` user get moderator role if SAML attribute `isModerator` (or attribute specified by `DISCOURSE_SAML_MODERATOR_ATTRIBUTE`) is 1 or true.
- `DISCOURSE_SAML_MODERATOR_ATTRIBUTE`: defaults to `isModerator`
- `DISCOURSE_SAML_SYNC_ADMIN`: defaults to false. If set to `true` user get admin role if SAML attribute `isAdmin` (or attribute specified by `DISCOURSE_SAML_ADMIN_ATTRIBUTE`) is 1 or true.
- `DISCOURSE_SAML_SYNC_ADMIN`: defaults to false. If set to `true` user get admin role if SAML attribute `isAdmin` (or attribute specified by `DISCOURSE_SAML_ADMIN_ATTRIBUTE`) is 1 or true.
- `DISCOURSE_SAML_ADMIN_ATTRIBUTE`: defaults to `isAdmin`
- `DISCOURSE_SAML_SYNC_TRUST_LEVEL`: defaults to false. If set to `true` user's trust level is set to the SAML attribute `trustLevel` (or attribute specified by `DISCOURSE_SAML_TRUST_LEVEL_ATTRIBUTE`) which needs to be between 1 and 4.
- `DISCOURSE_SAML_TRUST_LEVEL_ATTRIBUTE`: defaults to `trustLevel`
### Converting an RSA Key to a PEM
If the idp has an RSA key split up as modulus and exponent, this javascript library makes it easy to convert to pem:
......@@ -75,6 +75,7 @@ https://www.npmjs.com/package/rsa-pem-from-mod-exp
### Moving from environment variables to Site Settings
With the Environment variables set, run this snippet in the rails console:
```ruby
SiteSetting.defaults.all.keys.each do |k|
next if !k.to_s.start_with?("saml_")
......@@ -85,6 +86,7 @@ SiteSetting.defaults.all.keys.each do |k|
end;
SiteSetting.saml_enabled = true
```
Then remove the environment variables and restart the server. The plugin will now be using site settings which can be modified in the admin UI.
### License
......
{
"name": "discourse-saml",
"version": "1.0.0",
"repository": "git@github.com:discourse/discourse-saml.git",
"repository": "https://github.com/discourse/discourse-saml",
"author": "Discourse",
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "^3.0.0"
"eslint-config-discourse": "^3.1.0"
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment