Keyrock is the FIWARE component responsible for Identity Management. Using Keyrock (in conjunction with other security components such as PEP Proxy and Authzforce) enables you to add OAuth2-based authentication and authorization security to your services and applications.
This project is part of FIWARE. For more information check the FIWARE Catalogue entry for Security.
📚 Documentation | 📄 Site | 🎓 Academy | quay.io | 🎯 Roadmap |
---|
- Background
- Install
- Usage
- API
- Tests
- Advanced Documentation
- Changes Introduced in 7.x
- Quality Assurance
- License
The main identity management concepts within Keyrock are:
- Users
- Have a registered account in Keyrock.
- Can manage organizations and register applications.
- Organizations
- Are group of users that share resources of an application (roles and permissions).
- Users can be members or owners (manage the organization).
- Applications
- has the client role in the OAuth 2.0 architecture and will request protected user data.
- Are able to authenticate users using their Oauth credentials (ID and secret) which unequivocally identify the application
- Define roles and permissions to manage authorization of users and organizations
- Can register Pep Proxy to protect backends.
- Can register IoT Agents.
Keyrock provides both a GUI and an API interface.
This GE is based on a JavaScript environment and SQL databases. In order to run the identity manager the following requirements must be installed:
- node.js
- npm
- mysql-server (^5.7)
- build-essential
- Clone Proxy repository:
git clone https://github.com/ging/fiware-idm.git
- Install the dependencies:
cd fiware-idm/
npm install
- Duplicate config.template in config.js:
cp config.js.template config.js
- Configure data base access credentials:
config.database = {
host: 'localhost', // default: 'localhost'
password: 'idm', // default: 'idm'
username: 'root', // default: 'root'
database: 'idm', // default: 'idm'
dialect: 'mysql' // default: 'mysql'
};
- To configure the server to listen HTTPS requests, generate certificates OpenSSL and configure config.js:
./generate_openssl_keys.sh
config.https = {
enabled: true, //default: 'false'
cert_file: 'certs/idm-2018-cert.pem',
key_file: 'certs/idm-2018-key.pem',
port: 443
};
- Create database, run migrations and seeders:
npm run-script create_db
npm run-script migrate_db
npm run-script seed_db
- Start server with admin rights (server listens in 3000 port by default or in 443 if HTTPS is enabled).
sudo npm start
You can test the Identity manager using the default user:
- Email:
admin@test.com
- Password:
1234
We also provide a Docker image to facilitate you the building of this GE.
- Here you will find the Dockerfile and the documentation explaining how to use it.
- In Docker Hub you will find the public image.
Information about how to use the Keyrock GUI can be found in the User & Programmers Manual.
Resources can be managed through the API (e.g. Users, applications and organizations). Further information can be found in the API section.
Finally, one of the main uses of this Generic Enabler is to allow developers to add identity management (authentication and authorization) to their applications based on FIWARE identity. This is posible thanks to OAuth2 protocol. For more information check the OAuth2 API.
For performing a basic end-to-end test, you have to follow the next steps. A detailed description about how to run tests can be found here.
- Verify that the host address of IdM can be reached. By default, web access will show a Login Page.
- Acquire a valid username and password and access with those credentials. The resulting web page is the landing page of the IdM KeyRock Portal.
- Verify that you can view the list of applications, organizations, etc.
- How to run tests
- User & Programmers Manual
- Installation & Administration Guide
- Connecting IdM to a eIDAS node
They biggest change introduced in 7.x is that the identity manager no longer depends on Openstack components Keystone and Horizon. Now is fully implemented in Node JS. Another remarkable changes have been made:
- A driver has been implemented in order to make authentication against another database different from the default one.
- The appearance of the web portal can be easily modified though configurable themes.
- Now users don't need to switch session in order to create an application that will belong to an organization.
- Permissions of an application can be edited or deleted.
- IdM could play the role of gateway between services and eDIAS Node in order to allow users authentication with their national eID.
- OAuth Refresh Token Supported.
- Configurable OAuth token types (Permanent tokens and Json Web Tokens).
- OAuth Revoke Token endpoint enable.
- Internazionalization od UI (Spanish and English supported).
- User Admin Panel.
- Trusted application for OAuth token validation.
- IdM could play the role as PDP for basic authorization.
- Complete Sign out. Delete session in services as well as in Keyrock.
This project is part of FIWARE and has been rated as follows:
Keyrock is licensed under the MIT License.
© 2018-2023 Universidad Politécnica de Madrid.