ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Schinzer <c.schin...@googlemail.com>
Subject Re: Multitenant, EncryptionKey
Date Thu, 17 May 2012 07:58:16 GMT
The issue seems to be the following:

Table TenantKeyEncryptingKey has a combined primary key (TenantId,KeyName)
while the GenericDelegator constructor attempts a findOne call as follows:

baseDelegator.findOne("TenantKeyEncryptingKey", true, "tenantId",
getDelegatorTenantId())

Ie. in my understanding the primary key is incomplete and hence invalid.

Fix-attempt:
(1) Convention required on the keyName: called it "jdbcpw" now, left
keyText empty (as I do not use keys at this point)
(2) adding the second primary key on the GenericDelegator constructor as
follows

baseDelegator.findOne("TenantKeyEncryptingKey", true, "tenantId",
getDelegatorTenantId(), "keyName", "jdbcpw");

... and that works out.
Hum. I presume this is then more for the dev list, is it ?

I shall open a ticket on JIRA in any case


2012/5/16 Carsten Schinzer <c.schinzer@googlemail.com>

> All,
>
>
> I am migrating from a r10.4 codebase towards the trunk.
>
> I do have a running and working Multi-Tenant setup in r10.4 base and was
> always able to load data using the following command line:
>
> java -jar ofbiz.jar -install -readers=seed -delegator=default#DCS
>
> Now, when I run this on the trunk codebase, I do get the following error
> message:
> ---- exception report
> ----------------------------------------------------------
> Failure in findOne operation for entity [TenantKeyEncryptingKey]:
> org.ofbiz.entity.GenericModelException: [GenericDelegator.findOne] Passed
> primary key is not a valid primary key:
> [GenericEntity:TenantKeyEncryptingKey][tenantId,DCS(java.lang.String)].
> Rolling back transaction.
>
> I checked the table tenant_key_encryption_key on the database and it is
> empty.
>
> Now I do have the following questions:
> (1) Why is the data load now attempting to lookup the Tenant's
> EncryptionKey? I do assume this is in order to allow for encrypted
> passwords on the TenantDataSource data file. Can I switch that off? If so,
> where?
> (2) What is the typical encryption method used in OFBiz? Does anyone have
> an example entry that defines a TenantKeyEntityKey entity?
>
> I did check the Multitenancy page on the wiki, but that does not seem to
> contain any change as compared to when I visited it last.
>
> Any help will be much appreciated !
> Kind regards
>
>
> Carsten
>



-- 

Best

Carsten Schinzer

Plankstettenstr. 7
80638 M√ľnchen
Germany

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message