FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 43 forks source link

Invalid tenant bad character in tenant name - #1344

Closed thinkingmik closed 1 year ago

thinkingmik commented 1 year ago

Hi,

I have an architectural question: is there a valid reason why the NGSILD-Tenant not allows -?

Could it be add this char in the tenant name in the future?

Thanks

kzangeli commented 1 year ago

It might be like that for no reason at all. It might also be a mondodb related restriction I'll look into it and let you know, right here in this issue.

hendelali commented 1 year ago

Is this somehow related to "Unable to extract tenants from the database - fatal error" when trying to install a fresh install in Docker? I have this issue and I'm just running either docker run fiware/orion-ld:1.1.1 or docker run fiware/orion-ld:latest in Mac environments. Same issue happens in Macs with Intel or Silicon procesors.

kzangeli commented 1 year ago

I don't think there's any connection with your problem. We'll fix yours as well, don't worry ;-)

kzangeli commented 1 year ago

There's no mongo-related restrictions for the hyphen. Now I need to make sure there's no NGSI-LD restriction and if not, I'll just go ahead and implement the change to accept hyphen as part of a tenant name

kzangeli commented 1 year ago

Also nothing in the NGSI-LD spec. No restrictions at all, in fact. We need to work on that, but I will make sure the hyphen is an allowed character once we get there in ETSI ISG CIM (I sit in the "committee" that defines the NGSI-.LD API).

I added the hyphen as an allowed char, recompiled, modified a functerst to use a tenant with a hyphen and I tested it. All OK. As this is next to nothing, I will include it in the PR I'm working on right now.

That PR should be merged into develop either late tonight or some time tomorrow.

thinkingmik commented 1 year ago

Great!! Thank you very much!!!

kzangeli commented 1 year ago

So, it's done. Test it and go ahead and close this issue if you're satisfied.

thinkingmik commented 1 year ago

It's ok! Thanks