You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2021/08/06 16:02:00 UTC
[jira] [Updated] (AIRAVATA-3496) createDomain uses the domainName
as domainId, creating referential integrity issues
[ https://issues.apache.org/jira/browse/AIRAVATA-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcus Christie updated AIRAVATA-3496:
--------------------------------------
Description:
If a gateway's name is different from it's ID, then:
- SharingServiceDBEventHandler.java creates a domain with domainId=gatewayId and domainName=gatewayName https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java#L145-L154
- but SharingRegistryServerHandler.java uses the domain name as the domainId https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java#L65
- this causes problems in subsequent code which assumes that the gatewayID is the same as the domainID
The PGA creates the gateway ID based on the gateway name, but sanitizes it, see https://github.com/apache/airavata-php-gateway/blob/develop/app/libraries/AdminUtilities.php#L21-L22.
In this specific instance, we had a gateway name of `gateway.ung` which the PGA turned into a gateway id of `gateway-ung`. Usually the gateway name and ID are the same so this isn't an issue.
h5. Workaround
Until this fix is in production, gateway names should only have lowercase letters and numbers and dashes.
was:
If a gateway's name is different from it's ID, then:
- SharingServiceDBEventHandler.java creates a domain with domainId=gatewayId and domainName=gatewayName https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java#L145-L154
- but SharingRegistryServerHandler.java uses the domain name as the domainId https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java#L65
- this causes problems in subsequent code which assumes that the gatewayID is the same as the domainID
The PGA creates the gateway ID based on the gateway name, but sanitizes it, see https://github.com/apache/airavata-php-gateway/blob/develop/app/libraries/AdminUtilities.php#L21-L22.
In this specific instance, we had a gateway name of `gateway.ung` which the PGA turned into a gateway id of `gateway-ung`. Usually the gateway name and ID are the same so this isn't an issue.
> createDomain uses the domainName as domainId, creating referential integrity issues
> -----------------------------------------------------------------------------------
>
> Key: AIRAVATA-3496
> URL: https://issues.apache.org/jira/browse/AIRAVATA-3496
> Project: Airavata
> Issue Type: Bug
> Components: PGA PHP Web Gateway, Sharing
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> If a gateway's name is different from it's ID, then:
> - SharingServiceDBEventHandler.java creates a domain with domainId=gatewayId and domainName=gatewayName https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java#L145-L154
> - but SharingRegistryServerHandler.java uses the domain name as the domainId https://github.com/apache/airavata/blob/develop/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java#L65
> - this causes problems in subsequent code which assumes that the gatewayID is the same as the domainID
> The PGA creates the gateway ID based on the gateway name, but sanitizes it, see https://github.com/apache/airavata-php-gateway/blob/develop/app/libraries/AdminUtilities.php#L21-L22.
> In this specific instance, we had a gateway name of `gateway.ung` which the PGA turned into a gateway id of `gateway-ung`. Usually the gateway name and ID are the same so this isn't an issue.
> h5. Workaround
> Until this fix is in production, gateway names should only have lowercase letters and numbers and dashes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)