mod-auth-openidc - 取消保护特定当整个站点受到 mod-auth-openidc 保护时
问题描述
我有一个带有 mod-auth-openidc 的 apache 2.4 站点保护。有没有办法取消保护该保护区内的特定物品?现在我的 apache 配置有一小段,其中 mod-auth-openidc 配置为保护整个站点。我发现在 137 个可能的 137 中,有 3 个不需要保护。如果没有办法取消保护 a 那么我将不得不单独保护或取消保护所有 137 。这是很多配置更改。
过去,我可以通过创建标签并指定 Allow from all 和 Satisfy any 来取消对特定位置的保护。这在使用 mod-auth-openidc 时不起作用。我还发现了一篇关于使用 SetEnvIf 提供公共访问权限的帖子,但这也不起作用。
<Location /mynewsite>
# Protect everything using oidc
AuthType openid-connect
Require claim "sub~^employeeGroup2*"
# Don't protect employeeplans
SetEnvIf Request_URI "(/mynewsite/employeeplans/)$" allow
Order allow,deny
Allow from env=allow
Satisfy any
</Location>
我不会在我的 apache 配置中创建 137 个配置段落。如果没有解决方案,我将不得不放弃这个项目。
解决方案
AuthType None
在这些路径上使用应该可以做到。
推荐阅读
- java - Eclipse 显示“Maven 配置问题:未知”
- python - 函数“重映射”错误中的未知插值方法
- python - 是否可以在 python 中以各种可能的方式重新组织字符以及如何?
- python - Python:如何迭代 n 维矩阵?
- c - 是否有一个 gcc 编译器选项可以帮助捕获形式参数类型和实际参数类型不匹配?
- python - 阵列点积
- visual-studio-2015 - ReportViewer 15 在 IE11 浏览器不支持错误中使用
- c - 我的缓冲区有问题,不是我的 C 程序中的所有线程的总和
- php - 如何在 php 中使用 implode 获取数据库表的列名
- python - 使用蓝图在烧瓶上渲染模板时图像不显示