简体   繁体   English

IBMi AS / 400上的Apache身份验证

[英]Apache authentication on IBMi AS/400

I'm trying to place an entire directory behind Apache Authentication on an IBMi AS/400 V7R2. 我正在尝试在IBMi AS / 400 V7R2上放置一个完整的Apache身份验证目录。 I need to specify credentials which have no relationship with the AS/400 other than the fact they are defined in a file on the IFS. 我需要指定与AS / 400无关的凭据,而不是它们在IFS上的文件中定义的事实。 I'm new to the IBMi world and am unsure where Apache was installed. 我是IBMi世界的新手,不确定Apache的安装位置。 I know I need to include a handful of Apache modules, but don't know where those are. 我知道我需要包含一些Apache模块,但不知道它们在哪里。 I also do not know where I can find the htpasswd.exe equivalent so I was going to be hopeful and use http://www.htaccesstools.com/htpasswd-generator-windows/ . 我也不知道在哪里可以找到htpasswd.exe等价物,所以我很有希望并使用http://www.htaccesstools.com/htpasswd-generator-windows/ The file which contains the credentials must have the password encrypted as well. 包含凭据的文件也必须加密密码。 I've tried various strings in a which command in PASE with no luck. 我在PASE中的which命令中尝试了各种字符串而没有运气。

I've also seen two different ways to include the password file ( PasswdFile and AuthUserFile ) but can't find the difference. 我还看到了两种不同的方法来包含密码文件( PasswdFileAuthUserFile ),但无法找到差异。 My assumption is that PasswdFile is used for actual IBMi system users and AuthUserFile is meant to be used with a .htpasswd.exe generated file for arbitrary users. 我的假设是PasswdFile用于实际的IBMi系统用户,而AuthUserFile用于为任意用户使用.htpasswd.exe生成的文件。

Code Examples I've tried: 代码示例我尝试过:

<Directory "/path/to/secure/directory">
    PasswdFile /path/to/.htpasswd
    AuthType Basic
    AuthName "To access the requested page, please enter your login credentials."
    AllowOverride AuthConfig Options
    Options Indexes
    Require valid-user
</Directory>

OR 要么

<Directory "/path/to/secure/directory">
    AuthType Basic
    AuthName "Secure Login"
    AuthUserFile /path/to/.htpasswd
    Require valid-user
</Directory>

The modules I was going to include to cover all of my bases until it was working include: 我将要包括的模块涵盖我的所有基础,直到它工作包括:

  • mod_access.so mod_access.so
  • mod_auth.so mod_auth.so
  • mod_auth_anon.so mod_auth_anon.so
  • mod_auth_dbm.so mod_auth_dbm.so
  • mod_auth_digest.so mod_auth_digest.so

Has anyone done this before, or knows how to do this on IBMi and can lend some guidance? 有没有人以前做过这个,或者知道如何在IBMi上做这个并且可以提供一些指导? Most articles specific to Apache for IBMi usually explain how to authenticate against existing IBMi users and then everything for .htpasswd base authentication is not specific to IBMi, so I don't know if Apache for IBMi is different in this case or if I'm doing something wrong. Apache for IBMi的大多数文章通常都解释了如何对现有的IBMi用户进行身份验证,然后.htpasswd基本身份验证的所有内容都不是特定于IBMi的,所以我不知道Apache for IBMi在这种情况下是否有所不同或者我是不是做错了。

Hope this works. 希望这有效。

I would say you're stuck using either the system user ids and password or validation lists. 我会说你使用了系统用户ID和密码或验证列表。 check out this link: http://www-01.ibm.com/software/webservers/httpservers/doc/v4r4/wmg/RZAG2M07.HTM#HDRPASSWDF 看看这个链接: http//www-01.ibm.com/software/webservers/httpservers/doc/v4r4/wmg/RZAG2M07.HTM#HDRPASSWDF

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM