Skip to content

Commit

Permalink
Merge 656761c into d6018ec
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Aug 17, 2020
2 parents d6018ec + 656761c commit 8c81af0
Show file tree
Hide file tree
Showing 13 changed files with 5,761 additions and 5,701 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rules": {
"camelcase": 0,
"snakecase/snakecase": "error",
"valid-jsdoc": 0
"valid-jsdoc": 0,
"no-shadow": 0
}
}
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"singleQuote": true,
"parser": "flow",
"printWidth": 120,
"trailingComma": "none",
"tabWidth": 2
}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ cp config.js.template config.js

```javascript
config.database = {
host: "localhost", // default: 'localhost'
password: "idm", // default: 'idm'
username: "root", // default: 'root'
database: "idm", // default: 'idm'
dialect: "mysql" // default: 'mysql'
host: 'localhost', // default: 'localhost'
password: 'idm', // default: 'idm'
username: 'root', // default: 'root'
database: 'idm', // default: 'idm'
dialect: 'mysql' // default: 'mysql'
};
```

Expand All @@ -118,8 +118,8 @@ config.database = {
```javascript
config.https = {
enabled: true, //default: 'false'
cert_file: "certs/idm-2018-cert.pem",
key_file: "certs/idm-2018-key.pem",
cert_file: 'certs/idm-2018-cert.pem',
key_file: 'certs/idm-2018-key.pem',
port: 443
};
```
Expand Down
4 changes: 2 additions & 2 deletions doc/eidas/server_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ eIDAS node has to be enabled in the configuration file:
```javascript
config.eidas = {
enabled: true,
gateway_host: "localhost",
node_host: "https://eidas.node.es/EidasNode",
gateway_host: 'localhost',
node_host: 'https://eidas.node.es/EidasNode',
metadata_expiration: 60 * 60 * 24 * 365 // One year
};
```
Expand Down
10 changes: 5 additions & 5 deletions doc/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Keyrock is using Docker and Docker Compose. Create docker-compose.yml file and
copy the following content to it:

```yaml
version: "2"
version: '2'

networks:
idm_network:
Expand All @@ -26,7 +26,7 @@ services:
mysql:
image: mysql/mysql-server:5.7.21
ports:
- "3306:3306"
- '3306:3306'
networks:
idm_network:
ipv4_address: 172.18.1.5
Expand All @@ -39,8 +39,8 @@ services:
fiware-idm:
image: fiware/idm
ports:
- "3000:3000"
- "443:443"
- '3000:3000'
- '443:443'
networks:
idm_network:
ipv4_address: 172.18.1.6
Expand All @@ -59,7 +59,7 @@ This will deploy two Docker containers: one for IdM Keyrock and another one for
the database instance (in this case is MySQL). The database is seeded with a
default user whose credentials are:

- Email: admin@test.com
- Email: `admin@test.com`

- Password: 1234

Expand Down
84 changes: 42 additions & 42 deletions doc/installation_and_administration_guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ it should be set to `http://localhost:` when running on development.

```javascript
config.port = 80;
config.host = "http://keyrock-domain-name.org:" + config.port;
config.host = 'http://keyrock-domain-name.org:' + config.port;
```

## Debug
Expand Down Expand Up @@ -80,8 +80,8 @@ Follow the next steps in order to enable the server to listen to HTTPS requests.
```javascript
config.https = {
enabled: true,
cert_file: "certs/idm-2018-cert.pem",
key_file: "certs/idm-2018-key.pem",
cert_file: 'certs/idm-2018-cert.pem',
key_file: 'certs/idm-2018-key.pem',
port: 443
};
```
Expand All @@ -103,9 +103,9 @@ Apart from HTTPS there are other 3 configurations related to handle security:

```javascript
config.session = {
secret: require("crypto")
secret: require('crypto')
.randomBytes(20)
.toString("hex"),
.toString('hex'),
expires: 60 * 60 * 1000
};
```
Expand All @@ -116,7 +116,7 @@ config.session = {

```javascript
config.password_encryption = {
key: "idm_encryption"
key: 'idm_encryption'
};
```

Expand All @@ -129,8 +129,8 @@ config.password_encryption = {
config.cors = {
enabled: true,
options: {
origin: "*",
methods: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE"],
origin: '*',
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE'],
allowedHeaders: undefined,
exposedHeaders: undefined,
credentials: undefined,
Expand Down Expand Up @@ -191,8 +191,8 @@ description of this feature. An example of this configuration is:
```javascript
config.eidas = {
enabled: true,
gateway_host: "localhost",
node_host: "https://se-eidas.redsara.es/EidasNode/ServiceProvider",
gateway_host: 'localhost',
node_host: 'https://se-eidas.redsara.es/EidasNode/ServiceProvider',
metadata_expiration: 60 * 60 * 24 * 365
};
```
Expand All @@ -208,7 +208,7 @@ is:
config.usage_control = {
enabled: true,
ptp: {
host: "localhost",
host: 'localhost',
port: 8090
}
};
Expand Down Expand Up @@ -247,11 +247,11 @@ change:

```javascript
config.database = {
host: "localhost",
password: "idm",
username: "root",
database: "idm",
dialect: "mysql",
host: 'localhost',
password: 'idm',
username: 'root',
database: 'idm',
dialect: 'mysql',
port: undefined
};
```
Expand Down Expand Up @@ -320,29 +320,29 @@ users:

**USER_VIEW Table**

| ID | password_salt | password | email | username |
| --- | ------------- | --------------- | --------------- | ------------- |
| 1 | 1234 | g34h432hjk54k2j | melinda@test.es | Melinda López |
| 2 | 1234 | 2h43h7fdj38302j | juanli@test.es | Juanli Jons |
| 3 | 1234 | j328478j328j423 | lesha@test.es | Lesha Magnen |
| ID | password_salt | password | email | username |
| --- | ------------- | --------------- | ----------------- | ------------- |
| 1 | 1234 | g34h432hjk54k2j | `melinda@test.es` | Melinda López |
| 2 | 1234 | 2h43h7fdj38302j | `juanli@test.es` | Juanli Jons |
| 3 | 1234 | j328478j328j423 | `lesha@test.es` | Lesha Magnen |

For enabling this external authentication you have to modify config.js file
customizing the database attributes.

```javascript
config.external_auth = {
enabled: true,
id_prefix: "external_",
id_prefix: 'external_',
password_encryption_key: undefined,
ecryption: "bcyrpt",
ecryption: 'bcyrpt',
database: {
host: "localhost",
host: 'localhost',
port: undefined,
database: "idm",
username: "root",
password: "idm",
user_table: "user_view",
dialect: "mysql"
database: 'idm',
username: 'root',
password: 'idm',
user_table: 'user_view',
dialect: 'mysql'
}
};
```
Expand All @@ -367,10 +367,10 @@ In order to allow this characteristic you need to edit the config file:

```javascript
config.authorization = {
level: "basic", // basic|advanced
level: 'basic', // basic|advanced
authzforce: {
enabled: false,
host: "localhost",
host: 'localhost',
port: 8080
}
};
Expand All @@ -385,9 +385,9 @@ config file:

```javascript
config.mail = {
host: "idm_host",
host: 'idm_host',
port: 25,
from: "noreply@host"
from: 'noreply@host'
};
```

Expand Down Expand Up @@ -416,7 +416,7 @@ If this parameter is set to null or undefined it means that there won't be
performed any email domail filtering. Example of configuration:

```javascript
config.email_list_type = "whitelist";
config.email_list_type = 'whitelist';
```

## Configure themes
Expand All @@ -436,8 +436,8 @@ You can change between these themes in config.js

```javascript
config.site = {
title: "Identity Manager",
theme: "default" // default/fiwarelab
title: 'Identity Manager',
theme: 'default' // default/fiwarelab
};
```

Expand All @@ -460,16 +460,16 @@ cd themes/example && touch _colors.scss _styles.scss style.scss

```css
/****************************** Default colors */
@import "../default/colors";
@import '../default/colors';

/****************************** Custom colors */
@import "colors";
@import 'colors';

/****************************** Default styles */
@import "../default/styles_call";
@import '../default/styles_call';

/****************************** Custom styles */
@import "styles";
@import 'styles';
```

- Edit \_colors.scss. For example:
Expand All @@ -485,8 +485,8 @@ $brand-secundary: orange;

```javascript
config.site = {
title: "Identity Manager",
theme: "example" // default/fiwarelab
title: 'Identity Manager',
theme: 'example' // default/fiwarelab
};
```

Expand Down
16 changes: 8 additions & 8 deletions doc/installation_and_administration_guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,35 @@ example:
    3.1\.Configure port and host:

```javascript
config.host = "http://localhost:3000";
config.host = 'http://localhost:3000';
config.port = 3000;
```

    3.2\.Configure database:

```javascript
config.database = {
host: "localhost",
password: "idm",
username: "root",
database: "idm",
dialect: "mysql"
host: 'localhost',
password: 'idm',
username: 'root',
database: 'idm',
dialect: 'mysql'
};
```

    3.3\.Configure session key:

```javascript
config.session = {
secret: "nodejs_idm"
secret: 'nodejs_idm'
};
```

    3.4\.Configure password encryption:

```javascript
config.password_encryption = {
key: "nodejs_idm"
key: 'nodejs_idm'
};
```

Expand Down
4 changes: 2 additions & 2 deletions doc/usage_control/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Usage control is a promising approach for access control in open, distributed,
heterogeneous and network-connected computer environments. It encompasses and
enhances traditional access control models, Trust Management (TM) and Digital
Rights Management (DRM), and its main novelties are mutability of attributes and
continuity of access decision evaluation. You can check more information in
this [repository](https://github.com/ging/fiware-usage-control).
continuity of access decision evaluation. You can check more information in this
[repository](https://github.com/ging/fiware-usage-control).

The FIWARE Identity Manager Keyrock plays the role of PAP (Policy Administration
Point) and PIP (Policy Information Point) in the Usage Control Architecture. It
Expand Down
2 changes: 1 addition & 1 deletion doc/usage_control/server_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ to a PTP has to be enabled in the configuration file:
config.usage_control = {
enabled: true,
ptp: {
host: "localhost",
host: 'localhost',
port: 8090
}
};
Expand Down
Loading

0 comments on commit 8c81af0

Please sign in to comment.