Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 98c25d0

Browse files
committed
chore: Use conventional commits
* prepare CI * fix ECS bugs
1 parent afa9f69 commit 98c25d0

File tree

113 files changed

+2016
-1627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2016
-1627
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
php-version: [7.4, 8.0]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Cache Composer dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: /tmp/composer-cache
26+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
27+
- name: Install dependencies
28+
uses: php-actions/composer@v5
29+
with:
30+
php_version: ${{ matrix.php-version }}
31+
version: 2
32+
php_extensions: json
33+
- name: Run easy coding standard
34+
run: vendor/bin/ecs check
35+
release:
36+
name: Release
37+
needs: [build]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
with:
43+
fetch-depth: 0
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v1
46+
with:
47+
node-version: 14
48+
- name: Release
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
run: npm install && npx semantic-release

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
"@semantic-release/github",
8+
["@semantic-release/git", {
9+
"assets": ["CHANGELOG.md"],
10+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
11+
}]
12+
]
13+
}

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
11
# perun-simplesamlphp-module
22
[![Latest Stable Version](https://poser.pugx.org/cesnet/simplesamlphp-module-perun/v/stable)](https://packagist.org/packages/cesnet/simplesamlphp-module-perun)
33
[![Latest Unstable Version](https://poser.pugx.org/cesnet/simplesamlphp-module-perun/v/unstable)](https://packagist.org/packages/cesnet/simplesamlphp-module-perun)
4-
[![CodeFactor](https://www.codefactor.io/repository/github/cesnet/perun-simplesamlphp-module/badge)](https://www.codefactor.io/repository/github/cesnet/perun-simplesamlphp-module)
4+
[![Build and CI](https://github.com/cesnet/simplesamlphp-module-perun/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/cesnet/simplesamlphp-module-perun/actions/workflows/build_and_check.yml)
55
[![License](https://poser.pugx.org/cesnet/simplesamlphp-module-perun/license)](https://packagist.org/packages/cesnet/simplesamlphp-module-perun)
66

77
Module which allows simpleSAMLphp to get data from Perun.
88

9+
## Contribution
10+
11+
This repository uses [Conventional Commits](https://www.npmjs.com/package/@commitlint/config-conventional).
12+
13+
Any change that significantly changes behavior in a backward-incompatible way or requires a configuration change must be marked as BREAKING CHANGE.
14+
15+
### Available scopes:
16+
* theme
17+
* Auth Process filters:
18+
* ensurevomember
19+
* forceaup
20+
* idpattribute
21+
* logininfo
22+
* perunattributes
23+
* entitlement
24+
* perunidentity
25+
* targetedid
26+
* proxyfilter
27+
* removeallattributes
28+
* idpentityid
29+
* stringifytargetedid
30+
* updateues
31+
* warningtestsp
32+
* ...
933

10-
Once you have installed SimpleSAMLphp, installing this module is very simple. First of all, you will need to download Composer if you haven't already. After installing Composer, just execute the following command in the root of your SimpleSAMLphp installation:
1134

1235
## Instalation
1336

37+
Once you have installed SimpleSAMLphp, installing this module is very simple. First, you will need to download Composer if you haven't already. After installing Composer, just execute the following command in the root of your SimpleSAMLphp installation:
38+
1439
`php composer.phar require cesnet/simplesamlphp-module-perun:dev-master`

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"require": {
2626
"simplesamlphp/simplesamlphp": "~1.17",
2727
"simplesamlphp/composer-module-installer": "~1.0",
28-
"cesnet/simplesamlphp-module-perunauthorize": "~2.0",
2928
"cesnet/simplesamlphp-module-chartjs": "~2.8.0",
3029
"symfony/var-exporter": "^5.0",
3130
"phpseclib/phpseclib": "~3.0",
@@ -37,5 +36,8 @@
3736
"web-token/jwt-signature": "^2.2",
3837
"web-token/jwt-signature-algorithm-rsa": "^2.2",
3938
"web-token/jwt-checker": "^2.2"
39+
},
40+
"require-dev": {
41+
"symplify/easy-coding-standard": "^9.2"
4042
}
4143
}

config-templates/challenges_config.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
$config = array(
3+
declare(strict_types=1);
4+
5+
$config = [
46
/**
57
* Path to public key
68
*/
@@ -25,4 +27,4 @@
2527
* Challenge length
2628
*/
2729
'challengeLength' => 64,
28-
);
30+
];

config-templates/module_discopower.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
2+
3+
declare(strict_types=1);
4+
25
/**
36
* Configuration for the DiscoPower module.
47
*/
58

69
$config = [
7-
810
// Which tab should be set as default. 0 is the first tab
911
'defaulttab' => 0,
1012

@@ -41,5 +43,4 @@
4143
* Example: 'cdc.lifetime' => 180*24*60*60, // 180 days
4244
*/
4345
'cdc.lifetime' => null,
44-
4546
];

config-templates/module_perun.php

Lines changed: 33 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/**
4-
* This is example configuration of SimpleSAMLphp Perun interface and additional features.
5-
* Copy this file to default config directory and edit the properties.
6+
* This is example configuration of SimpleSAMLphp Perun interface and additional features. Copy this file to default
7+
* config directory and edit the properties.
68
*
7-
* copy command (from SimpleSAML base dir)
8-
* cp modules/perun/module_perun.php config/
9+
* copy command (from SimpleSAML base dir) cp modules/perun/module_perun.php config/
910
*/
1011
$config = [
11-
1212
/**
1313
* base url to rpc with slash at the end.
1414
*/
@@ -39,38 +39,33 @@
3939
//'ldap.password' => 'password'
4040

4141
/**
42-
* Whether to use startTLS on port 389. Defaults to false.
43-
* SSL/TLS is always used for ldaps: regardless of this setting.
42+
* Whether to use startTLS on port 389. Defaults to false. SSL/TLS is always used for ldaps: regardless of this
43+
* setting.
4444
*/
4545
//'ldap.enable_tls' => true,
4646

4747
/**
4848
* Perun group name to eduPersonEntitlement mapping. Mapping is according to the spec in
49-
* https://aarc-project.eu/wp-content/uploads/2017/11/AARC-JRA1.4A-201710.pdf
50-
* groupNameAARC - enable group naming according to AARC spec globally,
51-
* every SP can overide it with groupMapping option
52-
* entitlementPrefix - prefix put in front of the Perun entitlement, do not forget to add ':' at the end
53-
* entitlementAuthority - name of the authority issuing the entitlement
49+
* https://aarc-project.eu/wp-content/uploads/2017/11/AARC-JRA1.4A-201710.pdf groupNameAARC - enable group naming
50+
* according to AARC spec globally, every SP can overide it with groupMapping option entitlementPrefix - prefix put
51+
* in front of the Perun entitlement, do not forget to add ':' at the end entitlementAuthority - name of the
52+
* authority issuing the entitlement
5453
*/
55-
'groupNameAARC' => true/false,
54+
'groupNameAARC' => true / false,
5655
'entitlementPrefix' => 'prefix',
5756
'entitlementAuthority' => 'authority',
5857

5958
/**
60-
* specify which type of IdPListService will be used
61-
* Expected values: csv, db
59+
* specify which type of IdPListService will be used Expected values: csv, db
6260
*/
6361
'idpListServiceType' => '',
6462

6563
/**
66-
*****************************************
6764
* Part of configuration for status page *
68-
*****************************************
6965
*/
7066

7167
/**
72-
* Specify the used interface to get the status data
73-
* Only NAGIOS type is now allowed
68+
* Specify the used interface to get the status data Only NAGIOS type is now allowed
7469
*/
7570
'status.type' => 'NAGIOS',
7671

@@ -99,28 +94,24 @@
9994
/**
10095
* Specify, if the peer verification is enabled,
10196
*
102-
* OPTIONAL
103-
* Default: false
97+
* OPTIONAL Default: false
10498
*/
10599
'status.nagios.peer_verification' => false,
106100

107101
/**
108102
* Specify the list of services, which will be shown
109103
*
110-
* OPTIONAL
111-
* Default: show all received services
104+
* OPTIONAL Default: show all received services
112105
*/
113106
'status.shown_services' => [
114107
'serviceIdentifier' => [
115108
'name' => 'serviceName',
116-
'description' => 'serviceDescription'
109+
'description' => 'serviceDescription',
117110
],
118111
],
119112

120113
/**
121-
****************************************
122114
* Part of configuration for listOfSps *
123-
****************************************
124115
*/
125116

126117
/**
@@ -171,21 +162,16 @@
171162
/**
172163
* Specify list of facility attributes, which will be shown
173164
*/
174-
'listOfSps.attributesDefinitions' => [
175-
''
176-
],
165+
'listOfSps.attributesDefinitions' => [''],
177166

178167
/**
179-
* Specify list of facility attributes which have translations.
180-
* If an attribute is not included in listOfSps.attributesDefinitions, it will be added.
181-
* Defaults to an empty array.
168+
* Specify list of facility attributes which have translations. If an attribute is not included in
169+
* listOfSps.attributesDefinitions, it will be added. Defaults to an empty array.
182170
*/
183171
//'listOfSps.multilingualAttributes' => [],
184172

185173
/**
186-
********************************************
187174
* Part of configuration for DS *
188-
********************************************
189175
*/
190176

191177
'wayf_config' => [
@@ -199,8 +185,8 @@
199185
*/
200186
'translate_module' => 'disco',
201187
/**
202-
* Specify prefix for filtering AuthnContextClassRef
203-
* All AuthnContextClassRef values starts with this prefix will be removed before the request will be send to IdP
188+
* Specify prefix for filtering AuthnContextClassRef All AuthnContextClassRef values starts with this prefix
189+
* will be removed before the request will be send to IdP
204190
*/
205191
'remove_authn_context_class_ref_prefixes' => ['urn:cesnet:proxyidp:'],
206192
/**
@@ -211,31 +197,30 @@
211197
'email' => '[email protected]',
212198
],
213199
/**
214-
* Warning configuration
215-
* The configuration can be loaded from file, url or directly from this config. All possibilities has to follow
216-
* the structure under the "config" key.
200+
* Warning configuration The configuration can be loaded from file, url or directly from this config. All
201+
* possibilities has to follow the structure under the "config" key.
217202
*/
218203
'warning_config' => [
219204
# IF SOURCE === FILE
220-
# 'file' => '/etc/perun/simplesamlphp/elixir/config/warning.php',
205+
# 'file' => '/etc/perun/simplesamlphp/elixir/config/warning.php',
221206
# IF SOURCE === URL
222-
# 'url' => 'https://test.com',
207+
# 'url' => 'https://test.com',
223208
# IF SOURCE === CONFIG
224209
'config' => [
225-
'enabled' => FALSE,
210+
'enabled' => false,
226211
'type' => 'INFO',
227212
'title' => [
228213
'en' => 'Sample text',
229-
'cs' => 'ukázkový text'
214+
'cs' => 'ukázkový text',
230215
],
231216
'text' => [
232217
'en' => 'Sample warning text',
233218
'cs' => 'ukázkový text',
234-
]
219+
],
235220
],
236221
],
237222
// enable box shaodw around the wrap element
238-
'boxed' => TRUE,
223+
'boxed' => true,
239224
// block of IDPs
240225
'idp_blocks_config' => [
241226
[
@@ -244,7 +229,7 @@
244229
// name that will be used in some classes and translation keys
245230
'name' => 'eduGAIN',
246231
//enable displaying of the texts
247-
'text_enabled' => TRUE,
232+
'text_enabled' => true,
248233
/* Translation for the hint above the entry. Leave out option to disable it if text_enabled is true
249234
'hint_translation' => [
250235
'en' => 'You can log in using your institutional account or another account you have on the web (e.g. Apple).',
@@ -264,7 +249,7 @@
264249
[
265250
'type' => 'tagged',
266251
'name' => 'social_idps',
267-
'text_enabled' => FALSE,
252+
'text_enabled' => false,
268253
//tags to include in the list
269254
'tags' => ['social'],
270255
// specific IDP entity IDs to include in the list
@@ -276,7 +261,7 @@
276261
'warning_test_sp_config' => [
277262
'header' => [
278263
'en' => '<h3>Warning - service in test environment</h3>',
279-
'cs' => '<h3>Varování - testovací služba</h3>'
264+
'cs' => '<h3>Varování - testovací služba</h3>',
280265
],
281266
'text' => [
282267
'en' => '<p>Service is in the test environment.<br class="spacer"/>Hit the continue button.</p>',

0 commit comments

Comments
 (0)