Git Product home page Git Product logo

Comments (4)

fisuda avatar fisuda commented on June 12, 2024 1

Normally, Keyrock should be setup with Mail Transfer Agent. After registing a new user on UI of Keyrock, a user will receive an email to active an account from Keyrock. Before doing that, a use can not log in keyrock. Probably, when a domain of an email does not found in a whitelist, Keyrock will not send a use to an email. But this topic is not about FIWARE Bing Bang. Please read Keyrock documentation or source code.

from fiware-big-bang.

fisuda avatar fisuda commented on June 12, 2024 1

Merged PR #237

from fiware-big-bang.

fisuda avatar fisuda commented on June 12, 2024
usersCreate003 error 400 Bad Request {"error":{"message":"Invalid email","code":400,"title":"Bad Request"}}

This error is a respose from your Keyrock instance. The error message of NGSI Go has a prefix like usersCreate003. A prefix consists of a Go lang function name and a position in the funciton. In this case, the function name is usersCreate. The position is 3rd. See here .

https://github.com/lets-fiware/ngsi-go/blob/1af5d5c69c3fb86187a303a322c589f58c4a1940/internal/keyrock/users.go#L132-L154

Could you try replacing exmaple.com with your domain?

ubuntu@fi-bb:~$ ngsi users create --host keyrock.letsfiware.jp --username user001 --email [email protected] --password 1234
usersCreate003 error 400 Bad Request {"error":{"message":"Invalid email","code":400,"title":"Bad Request"}}
ubuntu@fi-bb:~$ ngsi users create --host keyrock.letsfiware.jp --username user001 --email [email protected] --password 1234
368401c5-49d6-4624-90ee-e66d0a73d8b3
ubuntu@fi-bb:~$ ngsi users list
368401c5-49d6-4624-90ee-e66d0a73d8b3
admin

If you want to add a user with the example.com domain, add exmaple.com to config/keyrock/whitelist.txt and restart your Keyrock instance. The FIWARE Big bang sets up a Keyrock instance with whitelist as the email list type. See here.

ubuntu@fi-bb:~$ cat config/keyrock/whitelist.txt
letsfiware.jp
example.com
ubuntu@fi-bb:~$ ngsi users create --username user001 --email [email protected] --password 1234 --host keyrock.letsfiware.jp
4201c1fd-52d3-4bd7-abfd-94319266549e
ubuntu@fi-bb:~$ ngsi users get --uid 4201c1fd-52d3-4bd7-abfd-94319266549e -P
{
  "user": {
    "scope": [],
    "id": "4201c1fd-52d3-4bd7-abfd-94319266549e",
    "username": "user001",
    "email": "[email protected]",
    "enabled": true,
    "admin": false,
    "image": "default",
    "gravatar": false,
    "date_password": "2023-01-27T07:50:05.000Z",
    "description": null,
    "website": null
  }
}

from fiware-big-bang.

dkastl avatar dkastl commented on June 12, 2024

Thanks a lot!

This indeed works with an email address using the same (sub-) domain that was used for the setup.
To mention whitelist.txt in this context in the documentation is a good idea. It seems the whitelist does not apply when adding users through the UI. Not sure this is a bug or a feature ;-)

But it may affect self-registration, which also didn't work. Will need to try again.

from fiware-big-bang.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.