question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error creating Tenant with Tenant CA information

See original GitHub issue

Hono version: 1.5.0 Environment: Plain Kubernetes cluster

When I try to create a tenant with name “TEST_TENANT” with the following Tenant CA information

curl -i -X POST -H "content-type: application/json" --data-binary '[{
   "tenant-id": "TEST_TENANT",
   "enabled": true,
   "trusted-ca": [{
     "subject-dn": "subject=CN=TEST_TENANT,OU=Digital,O=L&T-Nxt Pvt Ltd,ST=TN,C=IN",
     "public-key": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt3UMpvxQkr3WdBBh6gvBzngrOzPMqJWPBSUWN3EUMBNciS2T34nXlLfl/ti5ZbejVdUcaOIQZDjHG61I5A5w20k6lohXYonYpMLiY1bLHnojvTc8HWel4FifgFR10jZAjwZ4FmS9kUpYsbGcRRxE0ZwsOgrfMngexBBaheHtN6jnjCKS8iGnHbTjEFw1PBI3Nelc7MXQi4srdyc9O3tAHPRzDEWiQ9XJZwDNhWt3MPGdWj5NdUcn2JT23ORcY1no6BbgbFq+0M8/MTKn3VWuLeCBro8ROiN4hiuzm1Iprq129daU/bUfilvWWeGP3jSV2oU4pBOnVOhcP1euIHcanFYE9/LPgq4kOjwrVrF/2UxR5I3kiYdDc/HM5SVWWa2r2aIHQKRRjIKdq8OkKAY8q9nAVGOv7rmnlKI208NU4sbIyfyS25XHBDOV0oUpEd/2Ef/evpNFJXGw6eAzaM1O+QnNF0xXnjmAp6imMM5xp/YOPfSRltFh7EpKNMp2HV4bMLK1zx8GnhZF97BjKMB7KTYf1TiVgTgvhqLHkaAmSfo/2zPmLVafRFJHZdgn52yN5vWtU9/+xwGdOAyCTxCWrJ+d4H/bMefPn1DVaR+Jhe1L2np5Hqo6AP0IiuL9gS79tP4gFBTy3WDXyzit9KSeXrCJ7hCHYUZouktSRhGUuZkCAwEAAQ=="
   }]
 }]' http://$REGISTRY_IP:28080/v1/tenants/TEST_TENANT

I’m getting the following response:

HTTP/1.1 400 Bad Request
content-type: text/plain; charset=utf-8
content-length: 12

What am I doing wrong here? or what is the correct way to register a tenant with its trusted CA information ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kaniyancommented, Dec 21, 2020

Also the JSON payload is invalid for two more reasons.

  1. The payload is enclosed within square brackets [...] which refers to an array and it doesn’t confirm to the spec.
  2. Inside the payload, the property "tenant-id": "TEST_TENANT" is not allowed. The tenant ID is specified already in the URL.

The valid payload in your case should be

{
    "enabled": true,
    "trusted-ca": [
        {
            "subject-dn": "CN=TEST_TENANT,OU=Digital,O=L&T-Nxt Pvt Ltd,ST=TN,C=IN",
            "public-key": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt3UMpvxQkr3WdBBh6gvBzngrOzPMqJWPBSUWN3EUMBNciS2T34nXlLfl/ti5ZbejVdUcaOIQZDjHG61I5A5w20k6lohXYonYpMLiY1bLHnojvTc8HWel4FifgFR10jZAjwZ4FmS9kUpYsbGcRRxE0ZwsOgrfMngexBBaheHtN6jnjCKS8iGnHbTjEFw1PBI3Nelc7MXQi4srdyc9O3tAHPRzDEWiQ9XJZwDNhWt3MPGdWj5NdUcn2JT23ORcY1no6BbgbFq+0M8/MTKn3VWuLeCBro8ROiN4hiuzm1Iprq129daU/bUfilvWWeGP3jSV2oU4pBOnVOhcP1euIHcanFYE9/LPgq4kOjwrVrF/2UxR5I3kiYdDc/HM5SVWWa2r2aIHQKRRjIKdq8OkKAY8q9nAVGOv7rmnlKI208NU4sbIyfyS25XHBDOV0oUpEd/2Ef/evpNFJXGw6eAzaM1O+QnNF0xXnjmAp6imMM5xp/YOPfSRltFh7EpKNMp2HV4bMLK1zx8GnhZF97BjKMB7KTYf1TiVgTgvhqLHkaAmSfo/2zPmLVafRFJHZdgn52yN5vWtU9/+xwGdOAyCTxCWrJ+d4H/bMefPn1DVaR+Jhe1L2np5Hqo6AP0IiuL9gS79tP4gFBTy3WDXyzit9KSeXrCJ7hCHYUZouktSRhGUuZkCAwEAAQ==",
            "not-before": "2020-12-21T12:13:38Z",
            "not-after": "2030-12-19T12:13:38Z"
        }
    ]
}
1reaction
sophokles73commented, Dec 21, 2020

The not-before and not-after properties require a value that is formatted according to the date-time format defined by RFC 3339.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating Tenant with Tenant CA information · Issue #2376
Hono version: 1.5.0 Environment: Plain Kubernetes cluster When I try to create a tenant with name "TEST_TENANT" with the following Tenant CA ......
Read more >
There was an error while creating the tenant
This can be caused by several things: 1) The Portal name is not resolvable. You should ensure you can reach the portal name...
Read more >
California-Tenants-Guide.pdf
California Tenants – A Guide to Residential Tenants' and Landlords' Rights and. Responsibilities was written initially by the Department of ...
Read more >
Failed to create one new tenant - Microsoft Q&A
Failed to create one new tenant. When create one tenant at "Azure Active Directory", it reports "Tenant creation failed. Access is denied.".
Read more >
Errors in your tenant screening report shouldn't keep you from ...
If your rental application is rejected due to information in a tenant screening report, this is considered an “adverse action.” Landlords are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found