帐户域设置后,帐户存储在哪里?

huangapple go评论160阅读模式
英文:

Where are accounts stored after setting an account domain?

问题

我想为账户和链接创建配置脚本,但我遇到了以下问题:

1- 通过HTML表单在基本设置中填充用户,而不使用账户域:
帐户域设置后,帐户存储在哪里?

2- 确认数据已填充:

帐户域设置后,帐户存储在哪里?

它会返回我通过表单创建的用户。

3- 创建一个名为“local-domain”的账户域,并将html验证器拖到内部(许多教程页面中的必需步骤):
帐户域设置后,帐户存储在哪里?

4- 再次打开HTML表单并填充新用户

5- 查询账户,它将不会显示新的账户。

6- 通过SCIM检查用户,它会返回所有用户(可选):

curl  -Ssk \
  -w "\n%{http_code}" \
  -H "Authorization: Bearer $1" \
  https://auth.curity.com:8443/user-management/Users/

那么它们在哪里注册了?如何在HSQL中查询它们?
我猜链接也发生了类似的情况。

任何指导或见解将不胜感激。

谢谢

英文:

I want to create provisioning scripts for accounts and links but I'm facing the following issue:

1- Populate users in a basic setup without account domains through html-form:
帐户域设置后,帐户存储在哪里?

2- Verify that the data gets populated:

帐户域设置后,帐户存储在哪里?

It returns the users that I have created through the form.

3- Create an account domain "local-domain" and drag html-authenticator inside.(Required step in many tutorial pages):
帐户域设置后,帐户存储在哪里?
4- Open html form again and populate new users

5-Query again accounts and it won't show the new accounts.

6- Check users by SCIM and it will return all of them (Optional):

curl -Ssk
-w "\n%{http_code}"
-H "Authorization: Bearer $1"
https://auth.curity.com:8443/user-management/Users/

So where are they registered? how can query them in HSQL?
I guess something similar happens with links.

Any guidance or insights would be greatly appreciated.

Thank you

答案1

得分: 1

账户存储在账户表中。账户域的唯一作用是用于账户链接。账户域存储在linked_accounts表中的条目中。所以看起来你的系统工作正常。我使用了一个PostgreSQL数据库按照你的步骤进行了测试,所有条目都在账户表中可用。

你可能遇到了一些阻止最新条目可见的HSQLDB特定行为。请注意,HSQLDB仅作为开发人员的便利而提供。它只是一个小型的入门数据库,不适合生产环境。听起来你现在已经远远超越了那个阶段,因为你正在开发高级功能。

我的开发数据库

对于本地开发环境,我最常使用基本部署的PostgreSQL。即使你将使用不同的生产数据库,这也可能会有用。以下是一些笔记,如果对你有用的话。我首先使用类似以下的docker选项

curity-data:
    image: postgres:15.3
    hostname: dbserver
    ports:
     - 5432:5432
    volumes:
      - ./data:/var/lib/postgresql/data
      - ./data-backup.sql:/docker-entrypoint-initdb.d/data-backup.sql
    environment:
      POSTGRES_USER: 'postgres'
      POSTGRES_PASSWORD: 'sonepassword'
      POSTGRES_DB: 'idsvr'

然后,我在管理界面的设施菜单中编辑默认数据源以设置匹配的属性:

驱动程序:org.postgresql.Driver
连接字符串:jdbc:postgresql://dbserver/idsvr
用户:...
密码:...

然后,你可以远程连接到PostgreSQL的Docker容器并运行查询:

export PGPASSWORD=somepassword && psql -p 5432 -d idsvr -U postgres
\dt;
select * from accounts;

你还可以定期备份你的用户:

export PGPASSWORD=somepassword && pg_dump -U postgres -d idsvr > /tmp/data-backup.sql
英文:

YOUR QUESTION

Accounts are stored in the accounts table. The only role of the account domain is for account linking. The account domain is stored against entries in the linked_accounts table. So it looks like your system is working fine. I went through your steps with a postgres database and all entries are available in the accounts table.

You may be running into some HSQLDB specific behavior that prevents the latest entries being visible. Note that HSQLDB is shipped as a convenience for developers. It is a small getting started database only, not suitable for production. It sounds to me that you are well beyond that stage now, since you are working on advanced features.

MY DEVELOPMENT DATABASE

For a local development setup, I most commonly use a basic deployment of postgres. This can be useful even if you will use a different production database. Some notes here in case they are useful to you. I start with docker options like these:

curity-data:
    image: postgres:15.3
    hostname: dbserver
    ports:
     - 5432:5432
    volumes:
      - ./data:/var/lib/postgresql/data
      - ./data-backup.sql:/docker-entrypoint-initdb.d/data-backup.sql
    environment:
      POSTGRES_USER: 'postgres'
      POSTGRES_PASSWORD: 'sonepassword'
      POSTGRES_DB: 'idsvr'

I then edit the default data source in the facilities menu of the Admin UI to set matching properties:

Driver: org.postgresql.Driver
Connection String: jdbc:postgresql://dbserver/idsvr
User: ...
Password: ...

You can then remote to the postgres docker container and run queries:

export PGPASSWORD=somepassword && psql -p 5432 -d idsvr -U postgres
\dt;
select * from accounts;

You can also backup your users periodically:

export PGPASSWORD=somepassword && pg_dump -U postgres -d idsvr > /tmp/data-backup.sql

huangapple
  • 本文由 发表于 2023年7月13日 23:55:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/76681311.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定