为OpenID Connect用户配置SystemLink用户名
- 更新时间2025-12-03
- 阅读时长4分钟
为OpenID Connect用户分配更有可读性的用户名。
为避免创建重复用户和丢失每个用户的设置,请在用户开始使用服务器之前配置用户名。
- 登录运行SystemLink的服务器,找到 C:\Program Files\National Instruments\Shared\Web Server\conf\defines.d\目录,在文本编辑器中打开50_mod_auth_openidc-defines.conf。
- 将配置UnDefine AUTH_OIDC_USER_CLAIM更改为Define AUTH_OIDC_USER_CLAIM ,并附加您希望SystemLink用作用户名claim名称。文件应该与下列范例类似。 备注 用户名在所有已启用的提供程序(包括OpenID Connect、LDAP、Windows和Web Server)中必须是唯一的。
# # Defined OpenID-Connect configuration for the Windows Apache installation. # # The name of the JSON map containing metadata about each identity provider. Define AUTH_OIDC_ATTRIBUTES_KEY ni-attributes # CA bundle to use when making requests to an identity provider. Define AUTH_OIDC_BUNDLE ../nicurl/ca-bundle.crt # Override the OIDCCacheShmEntrySizeMax to mitigate claim size issues Define AUTH_OIDC_CACHE_ENTRY_SIZE 66065 # Path to OIDC provider configuration. Define AUTH_OIDC_PROVIDER_DIR ${HTCONF_PATH}/openidc # The location to redirect when performing an OpenID-Connect login. Define AUTH_OIDC_REDIRECT_URI /login/openidc-redirect # # User-editable variables. # # Whether OIDC is enabled. Define AUTH_OIDC_ENABLED # The claim that will be used as the SystemLink user name. # If not defined, a combination of the sub and iss claims will be used. Define AUTH_OIDC_USER_CLAIM email # When enabled, /login/openidc-redirect?info=json and # /login/openidc-redirect?info=html will return the claims for the currently # logged in user. UnDefine AUTH_OIDC_ENABLE_CLAIM_INFO - 保存文件并重启NI Web服务器。
相关内容
- 查看OpenID Connect用户的声明
您可以使用声明(claim)为OpenID Connect用户分配角色并更新其SystemLink用户名。