当前位置: 首页 > wzjs >正文

福州市工程建设质量管理网站网站优化要多少钱

福州市工程建设质量管理网站,网站优化要多少钱,58同城盐城网站建设,万网怎么上传网站如有疑问,请看视频:CAS单点登录(第7版) 密码管理 概述 密码管理 如果身份验证因密码策略被拒绝而失败,CAS 能够拦截该请求并允许用户就地更新账户密码。CAS 的密码管理功能相当适中,或者,如果…

如有疑问,请看视频:CAS单点登录(第7版)

  1. 密码管理
    1. 概述
      1. 密码管理

如果身份验证因密码策略被拒绝而失败,CAS 能够拦截该请求并允许用户就地更新账户密码。CAS 的密码管理功能相当适中,或者,如果功能不足以满足您的策略需求,您始终可以将 CAS 重定向为使用单独的独立应用程序,该应用程序完全负责管理账户密码和相关流。

通过在 WAR 覆盖中包含以下依赖项来启用支持:

Apache Maven

Gradle

BOM - Spring

BOM - Gradle

资源

1

2

3

4

5

6

7

8

9

10

11

12

13

dependencies {

    /*

        The following platform references should be included automatically and are listed here for reference only.

        implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

        implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

        

        Including this module in the CAS WAR overlay is optional and unnecessary. This module is automatically included

        and bundled with the CAS server distribution and there are alternative options baked in to allow one to replace

        this module with another. The entry below is listed for reference only.

    */

implementation "org.apereo.cas:cas-server-support-pm-webflow"

}

 YAGNI

您无需在配置和 overlay 中显式包含此模块。这只是为了告诉你它存在。

      1. 配置

要了解有关可用通知选项的更多信息,请参阅本指南或本指南。

CAS 配置目录中提供了以下设置和属性:

  1. 必填

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.core.enabled=false

用于指示是否启用了口令管理工具的标志。

 org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

如何配置此属性?

·  cas.authn.pm.core.password-policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}

一个 String 值,表示密码策略正则表达式模式。最少 8 个字符,最多 10 个字符,至少 1 个大写字母、1 个小写字母、1 个数字和 1 个特殊字符。

此设置支持正则表达式模式。[?].

 org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

如何配置此属性?

显示 1 到 2 的 2 个条目

上一页1下一页

  1. 自选

 下面列出的配置设置在CAS配置元数据中标记为可选。该标志表示在最终用户CAS配置中不立即需要设置的存在,因为分配了默认值或功能的激活不受设置值的条件控制。换句话说,只有在需要修改默认值或需要打开由设置控制的功能时,才应在配置中包含此字段。

显示条目

搜索:

·  cas.authn.pm.core.auto-login=false

标记,指示成功更改密码是否应自动触发登录。

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

·  cas.authn.pm.core.password-policy-character-set=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789![]{}()%&*$#^<>~@|

CAS可以用来生成和建议新密码的字符集。

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

·  cas.authn.pm.core.password-policy-password-length=10

CAS在建议生成密码时使用的密码长度。

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

·  cas.authn.pm.history.core.enabled=false

标记以指示是否启用了密码历史跟踪。

org.appero.cas.configuration.model.support.pm.密码历史核心属性。

如何配置此属性?

·  cas.authn.pm.webflow.enabled=true

是否应启用webflow自动配置。

org.appero.cas.configuration.model.core.web.flow。Webflow自动配置属性。

如何配置此属性?

Showing 1 to 5 of 6 entries

Previous12Next

·  cas.authn.pm.webflow.order=0

配置Web流的顺序。

org.appero.cas.configuration.model.core.web.flow。Webflow自动配置属性。

如何配置此属性?

Showing 6 to 6 of 6 entries

Previous12Next

  1. 密码策略

Show  entries

Search:

·  cas.authn.pm.core.password-policy-character-set=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789![]{}()%&*$#^<>~@|

CAS可以用来生成和建议新密码的字符集。

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

·  cas.authn.pm.core.password-policy-password-length=10

CAS在建议生成密码时使用的密码长度。

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

·  cas.authn.pm.core.password-policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}

一个表示密码策略正则表达式模式的字符串值。最少8个字符,最多10个字符,至少1个大写字母、1个小写字母、1位数字和1个特殊字符。

此设置支持正则表达式模式。 [?].

org.appero.cas.configuration.model.support.pm.密码管理核心属性。

如何配置此属性?

Showing 1 to 3 of 3 entries

Previous1Next

  1. 笔记
      1. 密码重置

有关更多详细信息,请参阅本指南。

      1. 账户管理

CAS 还可能允许个人最终用户在迷你门户中更新其帐户中与密码管理相关的某些方面,例如重置密码或更新安全问题等。有关更多详细信息,请参阅本指南。

      1. 忘记用户名

要了解更多信息,请参阅本指南。

      1. 密码历史记录

要了解更多信息,请参阅本指南。

      1. 存储

可以通过以下方式找到用户帐户。

存储

指示

JSON 格式

请参阅本指南

Groovy

请参阅本指南

LDAP 协议

请参阅本指南

JDBC

请参阅本指南

REST

请参阅本指南

自定义

请参阅本指南

    1. 密码重置
      1. 密码管理 - 密码重置

CAS 可能允许用户自愿重置其密码。忘记帐户密码的用户可能会在其注册的电子邮件地址和/或电话上收到一个带有基于时间的过期策略的安全链接。该链接将允许用户提供他/她预定义的安全问题的答案,如果成功完成,将允许用户下次重置其密码并再次登录。您还可以为接受的密码指定模式。

默认情况下,用户成功更改密码后,他们将被重定向到登录屏幕以输入新密码并登录。CAS 还可以配置为在成功更改后自动将用户登录。可以通过 CAS 设置来更改此行为。

CAS 登录请求还接受一个特殊的 doChangePassword 查询参数,该参数允许强制启动密码重置流程。当已登录的用户想要更改其密码时,在存在现有 Single Sign-On 会话时,将此参数指定为 true 可能特别有用。

      1. 配置

CAS 配置目录中提供了以下设置和属性:

  1. 必填

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.reset.crypto.encryption.key=

加密密钥是一个 JWT,其长度由加密密钥大小设置定义。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

如何配置此属性?

·  cas.authn.pm.reset.crypto.signing.key=

签名密钥是一个 JWT,其长度由签名密钥大小设置定义。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

如何配置此属性?

·  cas.authn.pm.reset.mail.attribute-name=

指示此邮件的目标电子邮件地址的主体属性名称。这些属性必须已解析并可供 CAS 主体使用。当指定了多个属性时,将根据可用的 CAS 主体检查每个属性,以查找电子邮件地址值,这可能会导致发送多封电子邮件。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.support.email.EmailProperties.

如何配置此属性?

·  cas.authn.pm.reset.mail.from=

电子邮件发件人地址。

 org.apereo.cas.configuration.model.support.email.EmailProperties.

如何配置此属性?

·  cas.authn.pm.reset.mail.subject=

主题可以定义为 verbaitm,也可以使用语法 #{subject-language-key} 指向语言包中的消息键。此键应指向在相应语言包中定义的有效消息,然后通过活动区域设置选取该消息。如果语言代码无法解析实际主题,则将使用默认主题值。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.support.email.EmailProperties.

如何配置此属性?

显示 1 到 5 的 8 个条目

上一页12下一页

·  cas.authn.pm.google-recaptcha.enabled=true

Whether reCAPTCHA should be enabled.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.google-recaptcha.score=0.5

Google reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). reCAPTCHA learns by seeing real traffic on your site. For this reason, scores in a staging environment or soon after implementing may differ from production. As reCAPTCHA v3 doesn't ever interrupt the user flow, you can first run reCAPTCHA without taking action and then decide on thresholds by looking at your traffic in the admin console. By default, you can use a threshold of 0.5.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.google-recaptcha.secret=

The reCAPTCHA site secret.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.google-recaptcha.site-key=

The reCAPTCHA site key.

 This setting supports the Spring Expression Language.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

Showing 1 to 4 of 4 entries

Previous1Next

  1. 自选

·  cas.authn.pm.reset.crypto.alg=

The signing/encryption algorithm to use.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.enabled=true

Whether crypto operations are enabled.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.encryption.key-size=512

The encryption key size.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.signing.key-size=512

The signing key size.

 org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.strategy-type=ENCRYPT_AND_SIGN

Control the cipher sequence of operations. The accepted values are:

ENCRYPT_AND_SIGN: Encrypt the value first, and then sign.

SIGN_AND_ENCRYPT: Sign the value first, and then encrypt.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

Showing 1 to 5 of 18 entries

Previous1234Next

·  cas.authn.pm.reset.expiration=PT1M

How long in minutes should the password expiration link remain valid.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.pm.ResetPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.reset.include-client-ip-address=true

Whether the Password Management Token will contain the client IP Address.

 org.apereo.cas.configuration.model.support.pm.ResetPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.reset.include-server-ip-address=true

Whether the Password Management Token will contain the server IP Address.

 org.apereo.cas.configuration.model.support.pm.ResetPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.reset.mail.bcc=

Email BCC address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.reset.mail.cc=

Email CC address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

Showing 6 to 10 of 18 entries

Previous1234Next

·  cas.authn.pm.reset.mail.html=false

Indicate whether the message body should be evaluated as HTML text. The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.reset.mail.priority=1

Set the priority (X-Priority header) of the message. Values: 1 (Highest), 2 (High), 3 (Normal), 4 (Low), 5 (Lowest). The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.reset.mail.reply-to=

Email Reply-To address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.reset.mail.text=

电子邮件正文。可以是纯文本,也可以是对用作模板的外部文件的引用。

如果指定为扩展名为.gtemplate的外部文件的路径,则将使用Groovy模板引擎处理电子邮件正文。模板引擎使用JSP风格的<%%>脚本和<%=%>表达式语法或GString风格的表达式。变量out绑定到模板要写入的写入器。

如果使用纯文本,则使用命名变量处理字符串字幕候选的内容。例如,您可以通过${url}在电子邮件文本中引用预期的url变量,或者使用${token}定位token变量。在某些情况下,会向电子邮件正文处理器传递其他参数,其中可能包括身份验证和/或主体属性、可用区域设置、客户端http信息等。

org.appero.cas.configuration.model.support.email。电子邮件属性。

如何配置此属性?

·  cas.authn.pm.reset.mail.validate-addresses=false

Set whether to validate all addresses which get passed to this helper. The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

Showing 11 to 15 of 18 entries

Previous1234Next

·  cas.authn.pm.reset.multifactor-authentication-enabled=true

Controls whether password reset operations must activate and support a multifactor authentication flow based on the set of available MFA providers that are configured and active, before reset instructions can be shared and sent.

 org.apereo.cas.configuration.model.support.pm.ResetPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.reset.number-of-uses=-1

How many times you can use the password reset link. Stricly lower than 1 means infinite.

 org.apereo.cas.configuration.model.support.pm.ResetPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.reset.security-questions-enabled=true

重置操作是否需要安全问题,或者是否应将其标记为可选。

org.appero.cas.configuration.model.support.pm.重置密码管理属性。

如何配置此属性?

Showing 16 to 18 of 18 entries

Previous1234Next

  1. 签名和加密

·  cas.authn.pm.reset.crypto.strategy-type=ENCRYPT_AND_SIGN

Control the cipher sequence of operations. The accepted values are:

ENCRYPT_AND_SIGN: Encrypt the value first, and then sign.

SIGN_AND_ENCRYPT: Sign the value first, and then encrypt.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.signing.key=

The signing key is a JWT whose length is defined by the signing key size setting.

 This setting supports the Spring Expression Language.

 org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.signing.key-size=512

The signing key size.

 org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.encryption.key=

The encryption key is a JWT whose length is defined by the encryption key size setting.

 This setting supports the Spring Expression Language.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.encryption.key-size=512

The encryption key size.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

 How can I configure this property?

Showing 1 to 5 of 7 entries

Previous12Next

·  cas.authn.pm.reset.crypto.enabled=true

Whether crypto operations are enabled.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

·  cas.authn.pm.reset.crypto.alg=

The signing/encryption algorithm to use.

 org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

 How can I configure this property?

Showing 6 to 7 of 7 entries

Previous12Next

  1. 电子邮件服务器

·  spring.mail.default-encoding=UTF-8

默认MimeMessage编码。

如何配置此属性?

·  spring.mail.host=

SMTP服务器主机。例如,“smtp.example.com”。

如何配置此属性?

·  spring.mail.jndi-name=

Session JNDI name. When set, takes precedence over other Session settings.

 How can I configure this property?

·  spring.mail.password=

SMTP服务器的登录密码。

如何配置此属性?

·  spring.mail.port=

SMTP服务器端口。

如何配置此属性?

Showing 1 to 5 of 9 entries

Previous12Next

·  spring.mail.properties=

其他JavaMail会话属性。

如何配置此属性?

·  spring.mail.protocol=smtp

SMTP服务器使用的协议。

如何配置此属性?

·  spring.mail.test-connection=false

是否在启动时测试邮件服务器是否可用。

如何配置此属性?

·  spring.mail.username=

SMTP服务器的登录用户。

如何配置此属性?

Showing 6 to 9 of 9 entries

Previous12Next

  1. 笔记

要了解有关可用通知选项的更多信息,请参阅本指南或本指南。

        1. reCAPTCHA 集成

密码重置尝试可以受到保护并与 Google reCAPTCHA 集成。这需要为基本集成提供 reCAPTCHA 设置,并指示密码管理流程通过 reCAPTCHA 打开和验证请求。

CAS 配置目录中提供了以下设置和属性:

必填

自选

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.google-recaptcha.enabled=true

是否应启用 reCAPTCHA。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.google-recaptcha.score=0.5

Google reCAPTCHA v3 返回一个分数(1.0 很可能是良好的交互,0.0 很可能是机器人)。reCAPTCHA 通过查看您网站上的真实流量来学习。因此,暂存环境中或实施后不久的分数可能与生产环境不同。由于 reCAPTCHA v3 永远不会中断用户流程,因此您可以先运行 reCAPTCHA 而不执行任何操作,然后通过在 Admin Console 中查看流量来决定阈值。默认情况下,您可以使用阈值 0.5。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.google-recaptcha.secret=

reCAPTCHA 站点密钥。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.google-recaptcha.site-key=

reCAPTCHA 站点密钥。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

显示 1 到 4 的 4 个条目

上一页1下一页

      1. 执行器端点

CAS 提供以下端点:

  POST

/cas/actuator/passwordManagement/reset/{username} 

启动密码重置操作并通知用户。

    1. 密码同步
      1. 密码同步

CAS 提供了在身份验证事件中同步和更新各种目标中的帐户密码的功能。如果身份验证尝试成功,CAS 将尝试捕获提供的密码并更新在 CAS 设置中指定的目标。未能同步帐户密码通常会在日志中产生错误,并且该事件不被视为灾难性故障。

      1. LDAP 协议

将帐户密码与一个或多个 LDAP 服务器同步。通过在 WAR 覆盖中包含以下依赖项来启用支持:

Apache Maven

Gradle

BOM - Spring

BOM - Gradle

资源

1

2

3

4

5

6

7

8

9

10

dependencies {

    /*

        The following platform references should be included automatically and are listed here for reference only.

        implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

        implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

        

    */

implementation "org.apereo.cas:cas-server-support-ldap"

}

CAS 配置目录中提供了以下设置和属性:

必填

自选

LDAP & Active Directory

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.password-sync.ldap[0].base-dn=

要使用的基本 DN。在某些情况下,单个 LDAP 树的不同部分可能被视为 base-dns。可以使用特殊的分隔符指定每个条目并将其连接在一起,而不是为每个单独的 base-dn 复制 LDAP 配置块。用户 DN 按定义的顺序使用所有 base-dn 和 DNresolver 的组合进行检索。如果找到多个 DN,则 DN 解析应失败。否则,将返回找到的第一个 DN。通常的语法是:subtreeA,dc=example,dc=net|subtreeC,dc=example,dc=net。

 org.apereo.cas.configuration.model.core.authentication.passwordsync.LdapPasswordSynchronizationProperties.

如何配置此属性?

·  cas.authn.password-sync.ldap[0].bind-credential=

连接到 LDAP 时要使用的绑定凭证。

 org.apereo.cas.configuration.model.core.authentication.passwordsync.LdapPasswordSynchronizationProperties.

如何配置此属性?

·  cas.authn.password-sync.ldap[0].bind-dn=

连接到 LDAP 时要使用的绑定 DN。注入 LDAP 连接池的 LDAP 连接配置可以使用以下参数进行初始化:

bindDn/bindCredential provided - 在初始化连接时使用提供的凭证进行绑定。

bindDn/bindCredential 设置为 * - 使用快速绑定策略初始化池。

bindDn/bindCredential 设置为空白 - 跳过连接初始化;匿名执行操作。

提供的 SASL 机制 - 初始化连接时使用给定的 SASL 机制进行绑定。

 org.apereo.cas.configuration.model.core.authentication.passwordsync.LdapPasswordSynchronizationProperties.

如何配置此属性?

·  cas.authn.password-sync.ldap[0].ldap-url=

服务器的 LDAP URL。可以指定多个,用空格和/或逗号分隔。

 org.apereo.cas.configuration.model.core.authentication.passwordsync.LdapPasswordSynchronizationProperties.

如何配置此属性?

·  cas.authn.password-sync.ldap[0].password-attribute=unicodePwd

应保存密码的 LDAP 属性的名称。

 org.apereo.cas.configuration.model.core.authentication.passwordsync.LdapPasswordSynchronizationProperties.

如何配置此属性?

显示 1 到 5 的 6 个条目

上一页12下一页

    1. 密码历史记录
      1. 密码历史记录 - 密码管理

CAS允许跟踪和存储回收密码的策略。回收的密码保存在用户帐户的存储中,并在密码更新时检查其有效性。

以下设置和属性可从CAS配置曲库获得:

可选

笔记

下面列出的配置设置在CAS配置元数据中被标记为可选。该标志表示在最终用户CAS配置中不需要立即存在该设置,因为分配了默认值或功能的激活不受设置值的有条件控制。换句话说,如果您需要修改默认值或如果您需要打开由设置控制的功能,您应该只在您的配置中包含此字段。

Show  entries

搜索:

·  cas.authn.pm.history.core.enabled=false

指示是否启用密码历史跟踪的标志。

 org.apereo.cas.configuration.model.support.pm.PasswordHistoryCoreProperties.

如何配置此属性?

显示1到1个条目中的1个

上一个1下一个

启用密码历史记录功能后,可以通过 Groovy 或内存中后端在历史记录中跟踪密码。特定存储选项也可能提供自己的密码历史记录支持。

Groovy

自定义

一旦启用密码历史记录跟踪,就可以将其移交给外部 Groovy 脚本,如下所示:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

def exists(Object[] args) {

    def (request,logger) = args

    return false}

def store(Object[] args) {

    def (request,logger) = args

    return true}

def fetchAll(Object[] args) {

    def (logger) = args

    return []}

def fetch(Object[] args) {

    def (username,logger) = args

    return []}   

def remove(Object[] args) {

    def (username,logger) = args}

def removeAll(Object[] args) {

    def (logger) = args}

request 参数封装了一个 PasswordChangeRequest 对象,带有 username 和 password 字段。

CAS 配置目录中提供了以下设置和属性:

必填

Groovy 脚本

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.history.groovy.location=

在 CAS 能够自动监视底层资源的更改并动态检测更新和修改的情况和场景中,您可以将以下设置指定为环境变量或系统属性,其值为 false,以禁用资源观察程序:org.apereo.cas.util.io.PathWatcherService。

 org.apereo.cas.configuration.model.SpringResourceProperties.

如何配置此属性?

显示 1 到 1 的 1 个条目

上一页1下一页

要准备 CAS 以支持 Apache Groovy 并与之集成,请查看本指南。

    1. 忘记用户名
      1. 忘记用户名 - 密码管理

CAS 提供了检索忘记的用户名的功能。此行为与密码管理功能紧密集成,其中允许每个帐户存储服务使用用户的 suppliedidentifier(通常是电子邮件地址)检索用户记录,并通过电子邮件通知等提供用户名。

CAS 配置目录中提供了以下设置和属性:

  1. 必填

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.forgot-username.google-recaptcha.enabled=true

是否应启用 reCAPTCHA。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.forgot-username.google-recaptcha.score=0.5

Google reCAPTCHA v3 返回一个分数(1.0 很可能是良好的交互,0.0 很可能是机器人)。reCAPTCHA 通过查看您网站上的真实流量来学习。因此,暂存环境中或实施后不久的分数可能与生产环境不同。由于 reCAPTCHA v3 永远不会中断用户流程,因此您可以先运行 reCAPTCHA 而不执行任何操作,然后通过在 Admin Console 中查看流量来决定阈值。默认情况下,您可以使用阈值 0.5。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.forgot-username.google-recaptcha.secret=

reCAPTCHA 站点密钥。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.forgot-username.google-recaptcha.site-key=

reCAPTCHA 站点密钥。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

如何配置此属性?

·  cas.authn.pm.forgot-username.mail.attribute-name=

指示此邮件的目标电子邮件地址的主体属性名称。这些属性必须已解析并可供 CAS 主体使用。当指定了多个属性时,将根据可用的 CAS 主体检查每个属性,以查找电子邮件地址值,这可能会导致发送多封电子邮件。

此设置支持 Spring 表达式语言。

 org.apereo.cas.configuration.model.support.email.EmailProperties.

如何配置此属性?

显示 1 到 5 的 7 个条目

上一页12下一页

·  cas.authn.pm.forgot-username.mail.from=

来自地址的电子邮件。

org.appero.cas.configuration.model.support.email。电子邮件属性。

如何配置此属性?

·  cas.authn.pm.forgot-username.mail.subject=

电子邮件主题行。

主题可以定义为verbaitm,也可以使用语法#{subject-language key}指向语言包中的消息键。此键应指向在相应语言包中定义的有效消息,然后通过活动区域设置获取该消息。如果语言代码无法解析真实主题,则将使用默认主题值。

此设置支持Spring表达式语言。

org.appero.cas.configuration.model.support.email。电子邮件属性。

如何配置此属性?

Showing 6 to 7 of 7 entries

Previous12Next

  1. 自选

·  cas.authn.pm.forgot-username.enabled=true

是否应启用忘记/重置用户名功能。

org.appero.cas.configuration.model.support.pm.Forgot用户名密码管理属性。

如何配置此属性?

·  cas.authn.pm.forgot-username.google-recaptcha.activate-for-ip-address-pattern=

A regular expression pattern to indicate that captcha should be activated when the remote IP address matches this pattern, and otherwise skipped and disabled.

 This settings supports regular expression patterns. [?].

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.google-recaptcha.headers=

Headers, defined as a Map, to include in the request when making the verification call to the recaptcha API.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.google-recaptcha.invisible=false

Whether google reCAPTCHA invisible should be enabled.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.google-recaptcha.position=bottomright

The google reCAPTCHA badge position (only if invisible is enabled). Accepted values are:

bottomright: bottom right corner, default value.

bottomleft: bottom left corner

inline: allows to control the CSS.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

Showing 1 to 5 of 14 entries

Previous123Next

·  cas.authn.pm.forgot-username.google-recaptcha.verify-url=https://www.google.com/recaptcha/api/siteverify

The reCAPTCHA endpoint for verification of the reCAPTCHA response. The endpoint is specific to the reCAPTCHA provider:

For Google reCAPTCHA, the endpoint is https://www.google.com/recaptcha/api/siteverify.

For hCaptcha, the endpoint is https://hcaptcha.com/siteverify.

For Turnstile, the endpoint is https://challenges.cloudflare.com/turnstile/v0/siteverify.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.google-recaptcha.version=GOOGLE_RECAPTCHA_V2

Indicate the version of the recaptcha api. Available values are as follows:

GOOGLE_RECAPTCHA_V2: V2 version of the recaptcha API.

GOOGLE_RECAPTCHA_V3: V3 version of the recaptcha API.

HCAPTCHA: hCaptcha is an alternative to reCAPTCHA that requires website visitors to label images as part of its business model. The provider is more focused on manual image recognition challenges. It is a image classification task based CAPTCHA provider employing visual challenges like identifying objects.

TURNSTILE: Offers a CAPTCHA alternative by Cloudflare that prioritizes user experience and privacy. Turnstile delivers frustration-free, CAPTCHA-free web experiences to website visitors - with just a simple snippet of free code. Moreover, Turnstile stops abuse and confirms visitors are real without the data privacy concerns or awful user experience of CAPTCHAs.

 org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.mail.bcc=

Email BCC address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.mail.cc=

Email CC address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.mail.html=false

Indicate whether the message body should be evaluated as HTML text. The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

Showing 6 to 10 of 14 entries

Previous123Next

·  cas.authn.pm.forgot-username.mail.priority=1

Set the priority (X-Priority header) of the message. Values: 1 (Highest), 2 (High), 3 (Normal), 4 (Low), 5 (Lowest). The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.mail.reply-to=

Email Reply-To address, if any.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

·  cas.authn.pm.forgot-username.mail.text=

电子邮件正文。可以是纯文本,也可以是对用作模板的外部文件的引用。

如果指定为扩展名为.gtemplate的外部文件的路径,则将使用Groovy模板引擎处理电子邮件正文。模板引擎使用JSP风格的<%%>脚本和<%=%>表达式语法或GString风格的表达式。变量out绑定到模板要写入的写入器。

如果使用纯文本,则使用命名变量处理字符串字幕候选的内容。例如,您可以通过${url}在电子邮件文本中引用预期的url变量,或者使用${token}定位token变量。在某些情况下,会向电子邮件正文处理器传递其他参数,其中可能包括身份验证和/或主体属性、可用区域设置、客户端http信息等。

org.appero.cas.configuration.model.support.email。电子邮件属性。

如何配置此属性?

·  cas.authn.pm.forgot-username.mail.validate-addresses=false

Set whether to validate all addresses which get passed to this helper. The application of this setting depends on the email provider implementation and may not be fully supported everywhere. This is typically relevant for the default org.springframework.mail.javamail.JavaMailSender.

 org.apereo.cas.configuration.model.support.email.EmailProperties.

 How can I configure this property?

Showing 11 to 14 of 14 entries

Previous123Next

  1. 电子邮件服务器

·  spring.mail.username=

SMTP服务器的登录用户。

如何配置此属性?

·  spring.mail.test-connection=false

是否在启动时测试邮件服务器是否可用。

如何配置此属性?

·  spring.mail.protocol=smtp

SMTP服务器使用的协议。

如何配置此属性?

·  spring.mail.properties=

Additional JavaMail Session properties.

 How can I configure this property?

·  spring.mail.port=

SMTP服务器端口。

如何配置此属性?

Showing 1 to 5 of 9 entries

Previous12Next

·  spring.mail.password=

SMTP服务器的登录密码。

如何配置此属性?

·  spring.mail.jndi-name=

Session JNDI name. When set, takes precedence over other Session settings.

 How can I configure this property?

·  spring.mail.host=

SMTP服务器主机。例如,“smtp.example.com”。

如何配置此属性?

·  spring.mail.default-encoding=UTF-8

默认MimeMessage编码。

如何配置此属性?

Showing 6 to 9 of 9 entries

Previous12Next

  1. 笔记
    1. 账户解锁
      1. 账户解锁 - 密码管理

如果身份验证源已确定帐户状态为锁定或禁用,则 CAS 中的密码管理工具能够自动拦截该流,并允许用户解锁和启用其帐户。帐户解锁流程相当简单和适度,并提供了一种类似 reCAPTCHA 的解锁机制。此流程中的其他修改和步骤将需要进一步的自定义。帐户的解锁最终会传递到帐户存储服务上,并取决于存储服务(JSON、LDAP 等)是否支持此功能。

    1. 账户概况
      1. 帐户 (配置文件) 管理

CAS 中的帐户(配置文件)管理允许经过身份验证的最终用户在类似迷你门户的环境中浏览和/或更新其帐户的某些方面。此门户允许的典型操作可能包括重置密码或更新安全问题、浏览登录活动、注册设备以进行多因素身份验证等。

 记得

如果您正在寻找允许最终用户注册、注册和创建帐户的方法,您应该查看帐户注册功能。

功能激活

要激活此功能,必须打开以下功能开关:

1

CasFeatureModule.AccountManagement.enabled=true

要了解有关配置功能切换的更多信息,请参阅此页面。

      1. 密码管理

要允许最终用户自愿重置其密码和/或更新其安全问题,必须按照此处指定的说明在 CAS 中启用密码管理功能。

      1. 审核日志活动

默认情况下,帐户管理仪表板允许您检查他们过去 60 天的登录活动。此信息是从 CAS 审计日志中为经过身份验证的用户获取的,必须将其配置为在专用存储服务(如关系数据库等)中记录可审计的登录活动。

      1. 多因素注册设备

如果在 CAS 中打开了多因素身份验证,则某些多重提供程序可能能够为经过身份验证的用户提供已注册的 MFA 设备列表。Multifactor 提供商还允许用户向 CAS 注册其设备并选择加入注册工作流程。

此功能取决于提供商以及它是否能够支持 Account Profile Management 功能。支持以下提供程序:

Duo 安全

谷歌身份验证器

FIDO2 WebAuthn

    1. 账户管理
      1. JSON
        1. 密码管理 - JSON

帐户和密码可以存储在静态适度的 JSON 资源中,其位置通过设置教给 CAS。此选项在开发、测试和演示期间最有用,不适合用于生产。

JSON 文件的轮廓可能与以下内容匹配:

1

2

3

4

5

6

7

8

9

10

11

12

{

  "casuser" : {

    "email" : "casuser@example.org",

    "password" : "p@ssw0rd",

    "phone" : "1234567890",

    "status": "OK",

    "securityQuestions" : {

      "question1" : "answer1",

      "question2" : "answer2"

    }

  }

}

CAS 配置目录中提供了以下设置和属性:

必填

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.json.location=

在 CAS 能够自动监视底层资源的更改并动态检测更新和修改的情况和场景中,您可以将以下设置指定为环境变量或系统属性,其值为 false,以禁用资源观察程序:org.apereo.cas.util.io.PathWatcherService。

 org.apereo.cas.configuration.model.support.pm.JsonPasswordManagementProperties.

如何配置此属性?

显示 1 到 1 的 1 个条目

上一页1下一页

      1. Groovy
        1. 密码管理 - Groovy

帐户和密码可以使用自定义的 Groovy 脚本来确定和处理。脚本的轮廓可能符合以下内容:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

import org.apereo.cas.pm.*

def change(Object[] args) {

    def (passwordChangeBean,logger) = args

    return true}

def findEmail(Object[] args) {

    def (passwordMgmtQuery,logger) = args

    return "cas@example.org"}

def findPhone(Object[] args) {

    def (passwordMgmtQuery,logger) = args

    return "1234567890"}

def findUsername(Object[] args) {

    def (passwordMgmtQuery,logger) = args

    return "casuser"}

def getSecurityQuestions(Object[] args) {

    def (passwordMgmtQuery,logger) = args

    return [securityQuestion1: "securityAnswer1"]}

def updateSecurityQuestions(Object[] args) {

    def (passwordMgmtQuery,logger) = args

    // Execute update...}

def unlockAccount(Object[] args) {

    def (credential,logger) = args

    // Execute unlock...

    return true}

CAS 配置目录中提供了以下设置和属性:

必填

Groovy 脚本

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.groovy.location=

在 CAS 能够自动监视底层资源的更改并动态检测更新和修改的情况和场景中,您可以将以下设置指定为环境变量或系统属性,其值为 false,以禁用资源观察程序:org.apereo.cas.util.io.PathWatcherService。

 org.apereo.cas.configuration.model.support.pm.GroovyPasswordManagementProperties.

如何配置此属性?

显示 1 到 1 的 1 个条目

上一页1下一页

要准备 CAS 以支持 Apache Groovy 并与之集成,请查看本指南。

      1. LDAP
        1. 密码管理 - LDAP

帐户密码和安全问题可能存储在 LDAP 服务器中。

通过在 WAR 覆盖中包含以下依赖项来启用 LDAP 支持:

Apache Maven

Gradle

BOM - Spring

BOM - Gradle

资源

1

2

3

4

5

6

7

8

9

10

dependencies {

    /*

        The following platform references should be included automatically and are listed here for reference only.

        implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

        implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

        

    */

implementation "org.apereo.cas:cas-server-support-pm-ldap"

}

CAS 配置目录中提供了以下设置和属性:

必填

自选

LDAP & Active Directory

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.ldap[0].account-locked-attribute=pwdLockout

表示帐户锁定状态的 LDAP 属性的名称。如果帐户已更新以指示锁定状态,则该属性的值通常设置为 "true"”。对于 Active Directory,此属性可能称为 lockoutTime。

 org.apereo.cas.configuration.model.support.pm.LdapPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.ldap[0].base-dn=

要使用的基本 DN。在某些情况下,单个 LDAP 树的不同部分可能被视为 base-dns。可以使用特殊的分隔符指定每个条目并将其连接在一起,而不是为每个单独的 base-dn 复制 LDAP 配置块。用户 DN 按定义的顺序使用所有 base-dn 和 DNresolver 的组合进行检索。如果找到多个 DN,则 DN 解析应失败。否则,将返回找到的第一个 DN。通常的语法是:subtreeA,dc=example,dc=net|subtreeC,dc=example,dc=net。

 org.apereo.cas.configuration.model.support.pm.LdapPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.ldap[0].bind-credential=

连接到 LDAP 时要使用的绑定凭证。

 org.apereo.cas.configuration.model.support.pm.LdapPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.ldap[0].bind-dn=

连接到 LDAP 时要使用的绑定 DN。注入 LDAP 连接池的 LDAP 连接配置可以使用以下参数进行初始化:

bindDn/bindCredential provided - 在初始化连接时使用提供的凭证进行绑定。

bindDn/bindCredential 设置为 * - 使用快速绑定策略初始化池。

bindDn/bindCredential 设置为空白 - 跳过连接初始化;匿名执行操作。

提供的 SASL 机制 - 初始化连接时使用给定的 SASL 机制进行绑定。

 org.apereo.cas.configuration.model.support.pm.LdapPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.ldap[0].ldap-url=

服务器的 LDAP URL。可以指定多个,用空格和/或逗号分隔。

 org.apereo.cas.configuration.model.support.pm.LdapPasswordManagementProperties.

如何配置此属性?

显示 1 到 5 的 8 个条目

一页12下一页

      1. JDBC
        1. 密码管理 - JDBC

帐户密码和安全问题可能存储在数据库中。

通过在 WAR 覆盖中包含以下依赖项来启用 JDBC 支持:

Apache Maven

Gradle

BOM - Spring

BOM - Gradle

资源

1

2

3

4

5

6

7

8

9

10

dependencies {

    /*

        The following platform references should be included automatically and are listed here for reference only.

        implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

        implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

        

    */

implementation "org.apereo.cas:cas-server-support-pm-jdbc"

}

CAS 配置目录中提供了以下设置和属性:

  1. 必填

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

搜索:

·  cas.authn.pm.jdbc.driver-class=org.hsqldb.jdbcDriver

用于连接到数据库的 JDBC 驱动程序。

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.encoding-algorithm=

要使用的编码算法,例如 MD5。当使用的类型为 DEFAULT 或 GLIBC_CRYPT 时相关。当与 PasswordEncoderTypes#PBKDF2 一起使用时,它应该是 PBKDF2WithHmacSHA1、PBKDF2WithHmacSHA256 或 PBKDF2WithHmacSHA512 之一。

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.type=NONE

可以使用以下类型:

NONE:不进行密码编码(即纯文本)。

DEFAULT:使用 CAS 的 DefaultPasswordEncoder。对于通过 character-encoding 和 encoding-algorithm 的消息摘要算法。

BCRYPT根据提供的强度和可选密钥使用 BCryptPasswordEncoder。

SCRYPT使用 SCryptPasswordEncoder。

PBKDF2:根据提供的强度和可选的密钥使用 Pbkdf2PasswordEncoder。

STANDARD根据提供的密钥使用 StandardPasswordEncoder。

SSHA使用 LdapShaPasswordEncoder 支持 Ldap SHA 和 SSHA (salted-SHA)。这些值采用 base-64 编码,并在编码的哈希前面加上标签 {SHA} 或 {SSHA}。

GLIBC_CRYPT:根据编码encoding-algorithm、提供的强度和可选的密钥使用 GlibcCryptPasswordEncoder。

org.example.MyEncoder:您自己选择的 PasswordEncoder 实现。

file:///path/to/script.groovy:负责处理密码编码操作的 Groovy 脚本的路径。

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

如何配置此属性?

·  cas.authn.pm.jdbc.password=

数据库连接密码。

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.jdbc.sql-change-password=

SQL 查询来更改密码并更新。

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

如何配置此属性?

显示 1 到 5 的 10 个条目

上一页12下一页

·  cas.authn.pm.jdbc.sql-find-email=

SQL查询以定位用户电子邮件地址。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

·  cas.authn.pm.jdbc.sql-find-phone=

SQL查询以定位用户电话号码。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

·  cas.authn.pm.jdbc.sql-find-user=

通过电子邮件定位用户的SQL查询。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

·  cas.authn.pm.jdbc.url=jdbc:hsqldb:mem:cas-hsql-database

数据库连接URL。

此设置支持Spring表达式语言。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

·  cas.authn.pm.jdbc.user=sa

数据库用户。

数据库用户必须具有足够的权限,以便在需要时能够处理架构更改和更新。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

Showing 6 to 10 of 10 entries

Previous12Next

  1. 自选

·  cas.authn.pm.jdbc.autocommit=false

The default auto-commit behavior of connections in the pool. Determined whether queries such as update/insert should be immediately executed without waiting for an underlying transaction.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.batch-size=100

A non-zero value enables use of JDBC2 batch updates by Hibernate. e.g. recommended values between 5 and 30.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.connection-timeout=PT30S

Indicates the maximum number of milliseconds that the service can wait to obtain a connection.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.data-source-name=

Attempts to do a JNDI data source look up for the data source name specified. Will attempt to locate the data source object as is.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.ddl-auto=update

Hibernate feature to automatically validate and exports DDL to the schema. By default, creates and drops the schema automatically when a session is starts and ends. Setting the value to validate or none may be more desirable for production, but any of the following options can be used:

validate: Validate the schema, but make no changes to the database.

update: Update the schema.

create: Create the schema, destroying previous data.

create-drop: Drop the schema at the end of the session.

none: Do nothing.

Note that during a version migration where any schema has changed create-drop will result in the loss of all data as soon as CAS is started. For transient data like tickets this is probably not an issue, but in cases like the audit table important data could be lost. Using `update`, while safe for data, is confirmed to result in invalid database state. validate or none settings are likely the only safe options for production use.

For more info, see this.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

Showing 1 to 5 of 37 entries

Previous12345…8Next

·  cas.authn.pm.jdbc.default-catalog=

Qualifies unqualified table names with the given catalog in generated SQL.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.default-schema=

Qualify unqualified table names with the given schema/tablespace in generated SQL.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.dialect=org.hibernate.dialect.HSQLDialect

The database dialect is a configuration setting for platform independent software (JPA, Hibernate, etc) which allows such software to translate its generic SQL statements into vendor specific DDL, DML.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.fail-fast-timeout=1

Set the pool initialization failure timeout.

Any value greater than zero will be treated as a timeout for pool initialization. The calling thread will be blocked from continuing until a successful connection to the database, or until the timeout is reached. If the timeout is reached, then a PoolInitializationException will be thrown.

A value of zero will not prevent the pool from starting in the case that a connection cannot be obtained. However, upon start the pool will attempt to obtain a connection and validate that the connectionTestQuery and connectionInitSql are valid. If those validations fail, an exception will be thrown. If a connection cannot be obtained, the validation is skipped and the the pool will start and continue to try to obtain connections in the background. This can mean that callers to DataSource#getConnection() may encounter exceptions.

A value less than zero will not bypass any connection attempt and validation during startup, and therefore the pool will start immediately. The pool will continue to try to obtain connections in the background. This can mean that callers to DataSource#getConnection() may encounter exceptions.

Note that if this timeout value is greater than or equal to zero (0), and therefore an initial connection validation is performed, this timeout does not override the connectionTimeout or validationTimeout; they will be honored before this timeout is applied. The default value is one millisecond.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.fetch-size=100

Used to specify number of rows to be fetched in a select query.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

Showing 6 to 10 of 37 entries

Previous12345…8Next

·  cas.authn.pm.jdbc.generate-statistics=false

Allow hibernate to generate query statistics.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.health-query=

The SQL query to be executed to test the validity of connections. This is for "legacy" databases that do not support the JDBC4 Connection.isValid() API.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.idle-timeout=PT10M

Controls the maximum amount of time that a connection is allowed to sit idle in the pool.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.isolate-internal-queries=false

This property determines whether data source isolates internal pool queries, such as the connection alive test, in their own transaction.

Since these are typically read-only queries, it is rarely necessary to encapsulate them in their own transaction. This property only applies if #autocommit is disabled.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.isolation-level-name=ISOLATION_READ_COMMITTED

Defines the isolation level for transactions. @see org.springframework.transaction.TransactionDefinition

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

Showing 11 to 15 of 37 entries

Previous12345…8Next

·  cas.authn.pm.jdbc.leak-threshold=PT6S

Controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.password-encoder.character-encoding=UTF-8

要使用的编码算法,如“UTF-8”。当使用的类型为DEFAULT时相关。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.hash-length=16

When used by PasswordEncoderTypes#ARGON2, it indicates the hash strength/length.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.password-encoder.iterations=310000

When used by PasswordEncoderTypes#PBKDF2, it indicates the required number of iterations.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.password-encoder.secret=

Secret to use with PasswordEncoderTypes#STANDARD, PasswordEncoderTypes#PBKDF2, PasswordEncoderTypes#BCRYPT, PasswordEncoderTypes#GLIBC_CRYPT password encoders. Secret usually is an optional setting.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

Showing 16 to 20 of 37 entries

Previous12345…8Next

·  cas.authn.pm.jdbc.password-encoder.strength=16

用于密码哈希的强度或迭代次数。通常在处理PasswordEncoderTypes#BCRYPT、PasswordEncoderType#PBKDF2或PasswordEncoderTypes#GLIBC_CRYPT时相关。当由PasswordEncoderTypes#ARGON2或PasswordEncoderType#PBKDF2使用时,它表示盐的强度。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

·  cas.authn.pm.jdbc.physical-naming-strategy-class-name=org.apereo.cas.hibernate.CasHibernatePhysicalNamingStrategy

Fully-qualified name of the class that can control the physical naming strategy of hibernate.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.keep-alive-time=0

This property controls the keepalive interval for a connection in the pool. An in-use connection will never be tested by the keepalive thread, only when it is idle will it be tested. Default is zero, which disables this feature.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.max-size=18

Controls the maximum number of connections to keep in the pool, including both idle and in-use connections.

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.max-wait=PT2S

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.

A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

Showing 21 to 25 of 37 entries

Previous1…45678Next

·  cas.authn.pm.jdbc.pool.maximum-lifetime=PT10M

This property controls the maximum lifetime of a connection in the pool. When a connection reaches this timeout, even if recently used, it will be retired from the pool. An in-use connection will never be retired, only when it is idle will it be removed.

 This settings supports the java.time.Duration syntax [?].

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.min-size=6

Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections.

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.name=

Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration.

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.suspension=false

Whether or not pool suspension is allowed.

There is a performance impact when pool suspension is enabled. Unless you need it (for a redundancy system for example) do not enable it.

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.pool.timeout-millis=1000

The maximum number of milliseconds that the pool will wait for a connection to be validated as alive.

 org.apereo.cas.configuration.model.support.ConnectionPoolingProperties.

 How can I configure this property?

Showing 26 to 30 of 37 entries

Previous1…45678Next

·  cas.authn.pm.jdbc.propagation-behavior-name=PROPAGATION_REQUIRED

Defines the propagation behavior for transactions. @see org.springframework.transaction.TransactionDefinition

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.properties=

Additional settings provided by Hibernate (or the connection provider) in form of key-value pairs.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.read-only=false

Configures the Connections to be added to the pool as read-only Connections.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.sql-delete-security-questions=

SQL query to delete security questions for the account, if any.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.sql-get-security-questions=

SQL查询以查找帐户的安全问题(如果有的话)。

org.appero.cas.configuration.model.support.pm.Jdbc密码管理属性。

如何配置此属性?

Showing 31 to 35 of 37 entries

Previous1…45678Next

·  cas.authn.pm.jdbc.sql-unlock-account=

SQL query to unlock accounts.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.sql-update-security-questions=

SQL query to update security questions for the account, if any.

 org.apereo.cas.configuration.model.support.pm.JdbcPasswordManagementProperties.

 How can I configure this property?

Showing 36 to 37 of 37 entries

Previous1…45678Next

  1. Hibernate 和 JDBC

·  cas.jdbc.case-insensitive=false

When choosing physical table names, determine whether names should be considered case-insensitive.

 How can I configure this property?

·  cas.jdbc.gen-ddl=true

Whether to generate DDL after the EntityManagerFactory has been initialized creating/updating all relevant tables.

 How can I configure this property?

·  cas.jdbc.physical-table-names=

Indicate a physical table name to be used by the hibernate naming strategy in case table names need to be customized for the specific type of database. The key here indicates the CAS-provided table name and the value is the translate physical name for the database. If a match is not found for the CAS-provided table name, then that name will be used by default.

 How can I configure this property?

·  cas.jdbc.show-sql=false

Whether SQL queries should be displayed in the console/logs.

 How can I configure this property?

Showing 1 to 4 of 4 entries

Previous1Next

  1. 密码编码

·  cas.authn.pm.jdbc.password-encoder.type=NONE

定义要使用的密码编码器类型。类型可以指定为空白或无,以禁用密码编码。如果您希望定义自己的编码器,它也可能指实现Spring Security的PasswordEncoder接口的完全限定类名。

可以使用以下类型:

无:不进行密码编码(即纯文本)。

DEFAULT:使用CAS的DefaultPasswordEncoder。用于消息摘要算法的字符编码和编码算法。

BCRYPT:根据提供的强度和可选密钥使用BCryptPasswordEncoder。

SCRYPT:使用SCryptPasswordEncoder。

PBKDF2:根据提供的强度和可选密钥使用Pbkdf2PasswordEncoder。

标准:根据提供的密码使用StandardPasswordEncoder。

SSHA:使用LdapShaPasswordEncoder支持Ldap SHA和SSHA(salted SHA)。这些值以64进制编码,并在编码的哈希值前添加标签{SHA}或{SSHA}。

GLIBC_CRYPT:根据编码算法、提供的强度和可选密钥使用GlibcCryptPasswordEncoder。

例如。MyEncoder:您自己选择的PasswordEncoder的实现。

file:///path/to/script.groovy:负责处理密码编码操作的Groovy脚本的路径。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.strength=16

用于密码哈希的强度或迭代次数。通常在处理PasswordEncoderTypes#BCRYPT、PasswordEncoderType#PBKDF2或PasswordEncoderTypes#GLIBC_CRYPT时相关。当由PasswordEncoderTypes#ARGON2或PasswordEncoderType#PBKDF2使用时,它表示盐的强度。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.secret=

Secret to use with PasswordEncoderTypes#STANDARD, PasswordEncoderTypes#PBKDF2, PasswordEncoderTypes#BCRYPT, PasswordEncoderTypes#GLIBC_CRYPT password encoders. Secret usually is an optional setting.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.password-encoder.iterations=310000

When used by PasswordEncoderTypes#PBKDF2, it indicates the required number of iterations.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

·  cas.authn.pm.jdbc.password-encoder.hash-length=16

When used by PasswordEncoderTypes#ARGON2, it indicates the hash strength/length.

 org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties.

 How can I configure this property?

Showing 1 to 5 of 7 entries

Previous12Next

·  cas.authn.pm.jdbc.password-encoder.encoding-algorithm=

要使用的编码算法,如MD5。当使用的类型为DEFAULT或GLIBC_CRYPT时,相关。当与PasswordEncoderTypes#PBKDF2一起使用时,它应该是PBKDF2WithHmacSHA1、PBKDF2WithHmacSHA256或PBKDF2ithHmacSHA512之一。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

·  cas.authn.pm.jdbc.password-encoder.character-encoding=UTF-8

要使用的编码算法,如“UTF-8”。当使用的类型为DEFAULT时相关。

org.appero.cas.configuration.model.core.authentication。密码编码器属性。

如何配置此属性?

Showing 6 to 7 of 7 entries

Previous12Next

  1. 笔记

用户帐户的预期数据库架构为:

1

2

create table pm_table_accounts (id int, userid varchar(255), password varchar(255),

    email varchar(255), phone varchar(255), enabled tinyint);

帐户安全问题的预期数据库架构为:

1

create table pm_table_questions (id int, userid varchar(255), question varchar(255), answer varchar(255));

密码历史记录

此功能还支持密码历史记录跟踪和存储。通过 JDBC 管理密码会将 CAS 切换为对密码历史记录使用相同的 JDBC 配置。

      1. REST
        1. 密码管理 - REST

查找用户的电子邮件和安全问题以及管理和更新密码等任务将委派给用户定义的 REST 终端节点。

通过在 WAR 覆盖中包含以下依赖项来启用 REST 支持:

Apache Maven

Gradle

BOM - Spring

BOM - Gradle

资源

1

2

3

4

5

6

7

8

9

10

dependencies {

    /*

        The following platform references should be included automatically and are listed here for reference only.

        implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

        implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

        

    */

implementation "org.apereo.cas:cas-server-support-pm-rest"

}

CAS 配置目录中提供了以下设置和属性:

必填

笔记

下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。

Show  entries

·  cas.authn.pm.rest.endpoint-password=

密码管理端点的 Basic-Auth 密码。

 org.apereo.cas.configuration.model.support.pm.RestfulPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.rest.endpoint-url-account-unlock=

解锁帐户时使用的终端节点 URL。

 org.apereo.cas.configuration.model.support.pm.RestfulPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.rest.endpoint-url-change=

更新密码时使用的端点 URL..

 org.apereo.cas.configuration.model.support.pm.RestfulPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.rest.endpoint-url-email=

查找电子邮件地址时使用的终端节点 URL。

 org.apereo.cas.configuration.model.support.pm.RestfulPasswordManagementProperties.

如何配置此属性?

·  cas.authn.pm.rest.endpoint-url-phone=

查找电话号码时使用的终端节点 URL。

 org.apereo.cas.configuration.model.support.pm.RestfulPasswordManagementProperties.

如何配置此属性?

搜索:

显示 1 到 5 的 11 个条目

上一页123下一页

端点

方法

预期响应

获取电子邮件地址

GET

username

200. 正文中的电子邮件地址。

获取电话号码

GET

username

200. 正文中的电话号码。

获取安全问题

GET

username

200. 正文中的安全问题映射。

更新密码

POST

username、password、oldPassword

200. 正文中的 true/false。

解锁账户

POST

username

200. 正文中的 true/false。

      1. Custom
        1. 密码管理 - 自定义

您还可以将自己的密码管理实现注入 CAS 中,该 CAS 本身将处理账户更新和检索。为此,您需要设计一个大致符合以下内容的配置类:

1

2

3

4

5

6

7

8

9

10

11

package org.apereo.cas.pm;

@AutoConfiguration

@EnableConfigurationProperties(CasConfigurationProperties.class)

public class MyPasswordConfiguration {

    @Bean

    public PasswordManagementService passwordChangeService() {

        ...

}

}

请参阅本指南,了解有关如何将配置注册到 CAS 运行时的更多信息。

    1. 密码管理配置
      1. 修改build.gradle配置

cas\build.gradle

......

dependencies {

    /**

    * Do NOT modify the lines below or else you will risk breaking dependency management.

    **/

    implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

    implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

    /**

     * Do NOT modify the lines below or else you will risk breaking the build.

     **/

    implementation "org.apereo.cas:cas-server-core-api-configuration-model"

    implementation "org.apereo.cas:cas-server-webapp-init"

    if (appServer == 'tomcat') {

        implementation "org.apereo.cas:cas-server-webapp-init-tomcat"

    }

    

    developmentOnly "org.springframework.boot:spring-boot-devtools:${project.springBootVersion}"

    // developmentOnly "org.springframework.boot:spring-boot-docker-compose:${project.springBootVersion}"

        

    /**

     * CAS dependencies and modules may be listed here.

     *

     * There is no need to specify the version number for each dependency

     * since versions are all resolved and controlled by the dependency management

     * plugin via the CAS bom.

     **/

    testImplementation "org.springframework.boot:spring-boot-starter-test"

// JDBC 属性解析

implementation "org.apereo.cas:cas-server-support-jdbc"

// MySQL数据库连接器

implementation "mysql:mysql-connector-java:8.0.33"

// JSON 服务注册中心

implementation "org.apereo.cas:cas-server-support-json-service-registry"

// 密码管理

implementation "org.apereo.cas:cas-server-support-pm-webflow"

// 密码管理-JDBC

implementation "org.apereo.cas:cas-server-support-pm-jdbc"

// 发送电子邮件

implementation "org.apereo.cas:cas-server-core-notifications"

}

      1. 修改application.yml配置

cas\src\main\resources\application.yml

# 需要的应用程序属性

# 嵌入在web应用程序中的内容可以包含在这里

cas:

    authn:

        accept:

            # 关闭CAS身份验证静态凭据

            enabled: "false"

        jdbc:

            query[0]:

                # 活动身份验证处理程序,默认情况下自动调用以全局验证凭据。

                state: "ACTIVE"

                # 用于连接到数据库的 JDBC 驱动程序。

                driver-class: "com.mysql.cj.jdbc.Driver"

                # 数据库连接URL。

                url: "jdbc:mysql://localhost:3306/cas?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true"

                # SQL查询要执行。例子:SELECT * FROM table WHERE name=?。

                sql: "SELECT * FROM pm_table_accounts WHERE userid=?"

                # 数据库用户。

                user: "root"

                # 数据库连接密码。

                password: "123456"

                # 要检索的密码字段/列名称。

                field-password: "password"

                # 数据库方言是平台独立软件(JPA、Hibernate 等)的配置设置,

                # 它允许此类软件将其通用 SQL 语句转换为供应商特定的 DDL、DML。

                dialect: "org.hibernate.dialect.HSQLDialect"

                # 指示帐户是否过期的布尔字段。

                field-expired: "false"

                # 指示帐户是否被禁用的布尔字段。

                field-disabled: "false"

                password-encoder:

                    # 要使用的编码算法,例如 MD5。

                    encoding-algorithm: "MD5"

                    # 不进行密码编码(即纯文本)。

                    type: "DEFAULT"

                    # 要使用的编码算法,例如“UTF-8”。当使用的类型是DEFAULT时相关。

                    character-encoding: "UTF-8"

                    # 使用时PasswordEncoderTypes#ARGON2,它表示哈希强度/长度。

                    hash-length: "32"

                    # 用于密码散列的强度或迭代次数。

                    # 通常在处理PasswordEncoderTypes#BCRYPT,PasswordEncoderTypes#PBKDF2或PasswordEncoderTypes#GLIBC_CRYPT时相关。

                    # 当与PasswordEncoderTypes#ARGON2或PasswordEncoderTypes#PBKDF2一起使用时,表示盐的强度。

                    strength: "32"

        

        pm:

            # webflow:

                # 是否应启用webflow自动配置。

                # enabled: "true"

                # 配置Web流的顺序。

                # order: "0"

            core:

                # 指示是否启用密码管理工具的标志。

                enabled: "true"

                # 表示密码策略正则表达式模式的字符串值。

                # 最少8个和最多10个字符,至少1个大写字母、1个小写字母、1个数字和1个特殊字符。

                # password-policy-pattern: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}"

                # 密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线)

                password-policy-pattern: "^[a-zA-Z]\\w{5,17}$"

                # 标记,指示成功更改密码是否应自动触发登录。

                auto-login: "false"

                

            # CAS密码管理-密码重置

            reset:

                # 过期分钟数

                # expiration-minutes: "30"

                # 是重置操作是否需要安全问题,还是应将其标记为可选。

                security-questions-enabled: "true"

                mail:

                    # 主属性名称,指示此消息的目标电子邮件地址。

                    attribute-name: "mail"

                    # 发件人邮箱地址。

                    from: "361604199@qq.com"

                    # 电子邮件主题可以定义为verbaitm,也可以使用语法#{subject-language-key}指向语言包中的消息键。

                    subject: "CAS密码管理-密码重置-电子邮件主题"

                    # 电子邮件主体。可以是纯文本或对将用作模板的外部文件的引用。

                    text: "尊敬的用户:您好,要重置 CAS 密码,请单击以下链接: ${url} 请注意:为安全起见,此链接将在自发送之时起 30 分钟后过期。如果您无法访问此链接,请将整个 URL 复制并粘贴到浏览器中,谢谢! 猴王软件学院"

                    # 电子邮件密送地址(如果有)。

                    # bcc:

                    # 电子邮件抽送地址(如果有)。

                    # cc:

                    

            # CAS密码管理-忘记用户名

            forgot-username:

                # 过期分钟数

                # expiration-minutes: "30"

                # 是否应启用忘记/重置用户名功能。

                enabled: "true"

                mail:

                    # 主属性名称,指示此消息的目标电子邮件地址。

                    attribute-name: "mail"

                    # 地址的电子邮件。

                    from: "361604199@qq.com"

                    # 电子邮件主题行。

                    subject: "CAS密码管理-忘记用户名-电子邮件主题"

                    # 电子邮件主体。可以是纯文本或对将用作模板的外部文件的引用。

                    text: "尊敬的用户:您好,要重置 CAS 密码,请单击以下链接: ${url} 请注意:为安全起见,此链接将在自发送之时起 30 分钟后过期。如果您无法访问此链接,请将整个 URL 复制并粘贴到浏览器中,谢谢! 猴王软件学院"

                    # 电子邮件回复地址(如果有)。

                    # reply-to: "361604199@qq.com"

                    # 电子邮件密送地址(如果有)。

                    # bcc:

                    # 电子邮件抽送地址(如果有)。

                    # cc:

            

            jdbc:

                password-encoder:

                    # 要使用的编码算法,例如MD5。当使用的类型为DEFAULT或GLIBC_CRYPT时相关。

                    encoding-algorithm: "MD5"

                    # 可以使用类型

                    type: "DEFAULT"

                    # Secret通常是一个可选设置。

                    # secret: "..."

                    # 用于密码哈希的强度或迭代次数。

                    strength: "32"

                    # 要使用的编码算法,如“UTF-8”。当使用的类型为DEFAULT时相关。

                    character-encoding: "UTF-8"

                    

                # 用于连接数据库的JDBC驱动程序。

                driver-class: "com.mysql.cj.jdbc.Driver"      

                # 数据库方言是独立于平台的软件(JPA、Hibernate等)的配置设置,

                # 它允许此类软件将其通用SQL语句转换为特定于供应商的DDL、DML。

                dialect: "org.hibernate.dialect.HSQLDialect"                

                # 数据库连接URL。

                url: "jdbc:mysql://localhost:3306/cas?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true"

                # 数据库用户。

                user: "root"

                # 数据库连接密码。

                password: "123456"

                # SQL查询来更改和更新密码。

                sql-change-password: "UPDATE pm_table_accounts SET password = ? WHERE userid=?"

                # SQL查询以定位用户电子邮件地址。

                sql-find-email: "SELECT email FROM pm_table_accounts WHERE userid=?"

                # SQL查询以定位用户电话号码。

                sql-find-phone: "SELECT phone FROM pm_table_accounts WHERE userid=?"

                # 通过用户定位用户的SQL查询。

                sql-find-user: "SELECT userid FROM pm_table_accounts WHERE email=?"

                # SQL查询以查找帐户的安全问题(如果有的话)。

                sql-get-security-questions: "SELECT question, answer FROM pm_table_questions WHERE userid=?"

                

    jdbc:

        # SQL 查询是否应显示在控制台/日志中。

        show-sql: "true"

        # 选择物理表名称时,确定名称是否应视为不区分大小写。

        case-insensitive: "false"

        # 是否在EntityManagerFactory初始化/更新所有相关表之后生成DDL。

        # gen-ddl: "true"

    

    # logout:

        # 注销之前,允许在 Web 界面上确认选项。

        # confirm-logout: "true"

        # 是否应允许 CAS 在注销后重定向到备用位置。

        # follow-service-redirects: "true"

        # 在此处,将指示 CAS 在注销后应重定向到的目标目标,并按您选择的参数名称提取。

        # 如果未指定,则默认值将用作 service。

        # redirect-parameter: ""

        # CAS 必须在所有注销作完成后立即重定向到的 URL。

        # 在 CAS 充当代理并需要重定向到外部身份提供商的注销端点以删除会话等情况下,通常很有用。

        # redirect-url: "https://casserver.houwang.edu:8443/cas/logout"

  

    # slo:

        # 是否应通过 HTTP 客户端以异步方式完成 SLO 回调。

        # 如果为 true,则 CAS 不会等待作完全完成,而是恢复控制以继续进行。

        # asynchronous: "true"

        # 是否应为 CAS 部署全局完全禁用 SLO。

        # disabled: "false"

        # 注销传播类型确定如何将 SLO 请求发送到应用程序。

        # 当使用前通道机制处理 SLO 请求时,这尤其适用。

        # logout-propagation-type: "AJAX"

        

    # sso:

        # 指示是否应为服务器全局启用并支持单点登录。

        # sso-enabled: "true"

        # 指示是否在重新续订的身份验证事件上创建 SSO 会话的标志。

        # create-sso-cookie-on-renew-authn: "true"

        # 指示此服务器实现是否支持 CAS 代理身份验证/票证。

        # proxy-authn-enabled: "true"

        # 指示此服务器实现是否应全局支持标记为“renew=true”的 CAS 协议身份验证请求。

        # renew-authn-enabled: "true"

        #

        # services:

            # 默认情况下,如果初始身份验证请求未识别目标应用程序,CAS 将显示通用成功页面。

            # allow-missing-service-parameter: "true"

            # 一种正则表达式模式,表示一个应用程序,

            # 该应用程序必须先与 CAS 建立会话,然后 CAS 才能允许访问其他应用程序。

            # required-service-pattern: "..."

    

    # service-registry:

        # json:

            # 在 CAS 能够自动监视底层资源的更改并动态检测更新和修改的情况和场景中。

            # location: "classpath:/services"

        # core:

            # 当设置为 true 时,CAS 会为已注册服务的特定预选字段创建内存中索引,

            # 从而允许它按其友好名称、客户端 ID 等查找服务定义。

            # index-services: "true"

            # 指示是否应将默认随 CAS 附带的服务定义包含在初始化过程中并导入到 CAS 服务注册表中的标志。

            # init-default-services: "true"

            # 您还可以通过 #isInitDefaultServices() 控制是否应包含和初始化 default 服务。

            # init-from-json: "true"

            

    # view:

        # default-redirect-url: "https://casserver.houwang.edu:8443/cas/logout"

    

    # tgc:

        # 如果发送此 cookie 应仅限于安全协议,则为 true,

        # 如果可以使用任何协议发送,则为 false。

        # secure: "false"

        

    server:

        name: "https://casserver.houwang.edu:8443"

        prefix: "https://casserver.houwang.edu:8443/cas"

    # ssl:

        # key-store: thekeystore

        # key-store-password: "changeit"

        # key-password: "changeit"

        

spring:

    mail:

        # 默认MimeMessage编码。

        default-encoding: "UTF-8"

        # SMTP服务器主机。例如,smtp.example.com。

        host: "smtp.qq.com"

        # SMTP服务器端口。

        port: "465"

        # SMTP服务器使用的协议。

        protocol: "smtp"

        # 是否在启动时测试邮件服务器是否可用。

        test-connection: "true"

        # SMTP服务器的登录用户。

        username: "361604199@qq.com"

        # SMTP服务器的登录密码。

        password: "pcjgofodyebmcahi"

        properties:

            mail:

                smtp:

                    auth: "true"

                    starttls:

                        enable: "true"

                    ssl:

                        enable: "true"

    

    # 本地化

    locale:

        # 默认区域设置。

        default-value: "zh_cn"

        # 切换语言环境时要使用的参数名称。

        param-name: "locale"

        

    # 消息包

    message-bundle:

        # 表示此消息包的基本名称的字符串列表。

        base-names: "classpath:messages_zh_CN,classpath:messages"

        # 表示此消息包的常用名称的字符串列表。

        common-names: "classpath:/messages_zh_CN.properties"

        # 缓存大小。

        cache-seconds: "PT180S"

        # 消息包字符编码。

        encoding: "UTF-8"

        # 如果未显式指定语言环境,则控制是否回退到默认系统语言环境的标志。

        fallback-system-locale: "false"

        # 控制是否使用代码消息的标志。

        use-code-message: "true"

http://www.dtcms.com/wzjs/314988.html

相关文章:

  • 做系统去哪个网站好免费推广网站大全
  • 毕设代做网站百度应用市场下载安装
  • 做装饰材料的网站谷歌外链
  • 用wordpress建立导航网站自制网页
  • 建设工程168网站百度云引擎搜索
  • 网站上怎么做星星评分企业网站优化外包
  • 山东恒昆建设工程有限公司网站国家免费技能培训官网
  • 宁波十大口碑最好的装饰公司评论优化
  • 南昌做网站的公司网站建设优化哪家公司好
  • 机械网站建设注意什么查询网址域名
  • 临沂网站开发技术员微信软文案例
  • 网站在线客服软件百度搜索工具
  • 手机建设网站的目的网站建成后应该如何推广
  • 做海报的网站小白qq百度如何搜索网址
  • 做的好详情页网站系统优化app
  • 济南地区做企业网站的公司seo推广外包
  • 建设一个怎样的自己的网站传统营销
  • 怎么做网站代理商如何做好网络推广
  • 动漫制作seo技术分享博客
  • 网站改版建设情况的汇报seo公司排名
  • 子网站建设的好处来客seo
  • 昆明旅行社网站开发24小时免费看的视频哔哩哔哩
  • 政府网站设计方案新闻今日头条最新消息
  • 衢州做外贸网站的公司wordpress免费建站
  • 延吉有没有做网站的可以推广发广告的app
  • 有没有学做家具的网站深圳专业seo外包
  • 做网站要备案培训班有哪些
  • 长沙 外贸网站建设百度竞价推广是什么工作
  • 本地主机做网站百度小程序优化
  • 全运会为什么建设网站站长工具的使用seo综合查询运营