fiware-idm icon indicating copy to clipboard operation
fiware-idm copied to clipboard

Cannot create application with Open ID Connect authentication

Open a-mroz opened this issue 2 years ago • 2 comments

Creating a new application usign 'Open ID Connect Authentication' option fails in the latest (8.3.0) docker image.

Logs:

fiware-keyrock  | 2022-11-12T20:08:02.484Z idm:web-application_controller --> create                                   
fiware-keyrock  | 2022-11-12T20:08:02.486Z idm:web-application_controller --> generate_app_certificates                                                                                                                                       fiware-keyrock  | 2022-11-12T20:08:02.526Z idm:web-application_controller Error:  Error: spawn /bin/sh ENOENT                                                                                                                                 fiware-keyrock  |     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:19)                                                                                                                                               
fiware-keyrock  |     at onErrorNT (internal/child_process.js:469:16)                                                                                                                                                                         
fiware-keyrock  |     at processTicksAndRejections (internal/process/task_queues.js:82:21) {                                                                                                                                                  fiware-keyrock  |   errno: -2,                                                                                                                                                                                                                fiware-keyrock  |   code: 'ENOENT',                                                                                                                                                                                                           
fiware-keyrock  |   syscall: 'spawn /bin/sh',                                                                                                                                                                                                 
fiware-keyrock  |   path: '/bin/sh',                                                                                                                                                                                                          
fiware-keyrock  |   spawnargs: [                                                                                                                                                                                                              
fiware-keyrock  |     '-c',                                                                                                                                                                                                                   
fiware-keyrock  |     'openssl genrsa -out certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem 2048 && openssl req -new -sha256 -key certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem -out certs/applicat
ions/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-csr.pem -subj "/C=IK/ST=World/L=World/O=Frontier Test/OU=Frontier Test/CN=http" && openssl x509 -days 365 -req -in certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-csr.pem -signkey certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem -out certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-cert.pem'                                                                                            
fiware-keyrock  |   ],                                                                                                                                                                                                                        
fiware-keyrock  |   cmd: 'openssl genrsa -out certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem 2048 && openssl req -new -sha256 -key certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem -out certs/appli
cations/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-csr.pem -subj "/C=IK/ST=World/L=World/O=Frontier Test/OU=Frontier Test/CN=http" && openssl x509 -days 365 -req -in certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-csr.pem -sig
nkey certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-key.pem -out certs/applications/c9f898bf-322f-43dc-b455-90d0afda1c06-oidc-cert.pem'                                                                                         
fiware-keyrock  | }                                                                                                                                                                                                                           
fiware-keyrock  | (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined                                                                                                                            
fiware-keyrock  |     at /opt/fiware-idm/controllers/web/applications.js:483:26                                                                                                                                                               
fiware-keyrock  |     at processTicksAndRejections (internal/process/task_queues.js:95:5)                                                                                                                                                     
fiware-keyrock  | (Use `node --trace-warnings ...` to show where the warning was created)                                                                                                                                                     
fiware-keyrock  | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .ca
tch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)                                  
fiware-keyrock  | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

a-mroz avatar Nov 12 '22 21:11 a-mroz

I had a similar issue with 8.3.2 and the problem was that openssl was not installed in the container. See #314

nikosft avatar Jan 24 '23 18:01 nikosft

same issue still exist in v.8.3.3

andrii482 avatar Apr 23 '23 22:04 andrii482