International-Data-Spaces-Association / omejdn-daps

Open Source implementation of the Dynamic Attribute Provisioning Service based on http://github.com/Fraunhofer-AISEC/omejdn-server
Apache License 2.0
5 stars 10 forks source link

Problems with create_test_token.rb file #13

Closed aetxeberriasqs closed 2 years ago

aetxeberriasqs commented 2 years ago

The Problem

There is a problem generatin with create_test_token.rb file. An error has occured when generating the token. The file create_test_token is not correctly filled and it gives me errors. I could not find in the documentation the information that should be written in the file.

As far as I have see, the iss and sub lines should be changed with the client_id that appears in the config/clilents.yml and the aud line should be chaged with idsc:IDS_CONNECTORS_ALL.

Apart from that, I need to change the client_id file in file 24 but I just see ARGV[0] and I dont really know what should I put there or if there are more lines that should be changed so that this file works. Maybe it should be stated in the documentation.

My Setup

i have followed the installation using dockers to the point to use the create_test_token so that later i can create the DAT, yet an error have appeared.

What I have done up front

i have tried to solve the problems the console states but i dont have enough documentation to solve the problem

What I expected to happen

to generate a token

What actually happened

The following error appeared:

The quest of trying to solve it

What were the results of searching for the error on the internet?

Please note down any search terms and what you learned already

What is your best guess as to what might have happened?

Please note down any suspicions

bellebaum commented 2 years ago

Perhaps the following distinction might help you:

For the relation between OAuth2.0 and the DAPS please take a look at this IDS-G Branch and read the relevant specifications linked there (usually the links with RFC or something alike).

create_test_token is a script for general-purpose Omejdn, not for the DAPS. It does tell you it's usage though if you run it:

Usage: create_test_token.rb client_id keyfile (AUD)

NOTE: The client_id must be specified in `config/clients.yml`.
A certificate for the client must be registered. If in doubt,
use the `import_certfile` option in `config/clients.yml` to
import it. The AUD value must correspond to the value set by
Omejdn. If you overwrote it, you must specify the correct
value here. This script only supports RSA keys.

So, fill in the client_id, keyfile and idsc:IDS_CONNECTORS_ALL as (AUD) on the command line and it should create a token for you. Changing the script is not necessary.

aetxeberriasqs commented 2 years ago

Hi, thanks for the information.

I have tried but I may been inserting the wrong information on those parts. The aud part and the 'iss' , and 'sub' have been completed, but i have put the client_id found in the clients.yml and the keyfile but it keeps failing

image

bellebaum commented 2 years ago

keyfile refers to the connector's key, not the DAPS signing key. What are the errors exactly?