janus-ssp / janus

Fully featured metadata registration administration module built on top of simpleSAMLphp.
Other
13 stars 8 forks source link

Use same JSON structure in REST API and UI import #566

Open baszoetekouw opened 9 years ago

baszoetekouw commented 9 years ago

I'm trying to import json data that I got from the REST API into the Janus web interface. This results in an unhandled exception (id 2f3246417c, among others).

The logs say:

Feb 23 16:23:10 prd43 simplesamlphp[27029]: 3 [2f3246417c] SimpleSAML_Error_Exception: Error 8 - Undefined index: entityid
Feb 23 16:23:10 prd43 simplesamlphp[27029]: 3 [2f3246417c] Backtrace:
Feb 23 16:23:10 prd43 simplesamlphp[27029]: 3 [2f3246417c] 2 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/www/_include.php:70 (SimpleSAML_error_handler)
Feb 23 16:23:10 prd43 simplesamlphp[27029]: 3 [2f3246417c] 1 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/modules/janus/www/editentity.php:290 (require)
Feb 23 16:23:10 prd43 simplesamlphp[27029]: 3 [2f3246417c] 0 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/www/module.php:134 (N/A)
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] Backtrace:
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] 0 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/www/module.php:179 (N/A)
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] Caused by: SimpleSAML_Error_Exception: Nothing to import!
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] Backtrace:
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] 1 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/modules/janus/www/importentity.php:47 (require)
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] 0 /opt/openconext/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/www/module.php:134 (N/A)
Feb 23 16:23:10 prd43 simplesamlphp[27033]: 3 [2f3246417c] Error report with id 04cc7b4f generated.

So apparently the json as generated by the REST API is incompatible with the json used in the UI. This seems undesirable and is quite confusing.

relaxnow commented 9 years ago

That is correct, they have different JSON output / inputs for now.

Long term plan is to make the UI use the API thereby resolving this issue.