Раздел 10. Apache modules Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 RU EN Пункт 100. Apache Module mod_auth_basic
SummaryThis module allows the use of HTTP Basic Authentication to
restrict access by looking up users in the given providers.
HTTP Digest Authentication is provided by
AuthBasicAuthoritative Directive
Normally, each authorization module listed in AuthBasicFake Directive
The username and password specified are combined into an Authorization header, which is passed to the server or service behind the webserver. Both the username and password fields are interpreted using the expression parser, which allows both the username and password to be set based on request parameters. If the password is not specified, the default value "password" will be used. To disable fake basic authentication for an URL space, specify "AuthBasicFake off". In this example, we pass a fixed username and password to a backend server. Fixed Example<Location "/demo"> AuthBasicFake demo demopass </Location> In this example, we pass the email address extracted from a client
certificate, extending the functionality of the FakeBasicAuth option
within the Certificate Example<Location "/secure"> AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" </Location> Extending the above example, we generate a password by hashing the email address with a fixed passphrase, and passing the hash to the backend server. This can be used to gate into legacy systems that do not support client certificates. Password Example<Location "/secure"> AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}" </Location> Exclusion Example<Location "/public"> AuthBasicFake off </Location> AuthBasicProvider Directive
The Example<Location "/secure"> AuthType basic AuthName "private area" AuthBasicProvider dbm AuthDBMType SDBM AuthDBMUserFile "/www/etc/dbmpasswd" Require valid-user </Location> Providers are queried in order until a provider finds a match for the requested username, at which point this sole provider will attempt to check the password. A failure to verify the password does not result in control being passed on to subsequent providers. Providers are implemented by AuthBasicUseDigestAlgorithm Directive
Normally, when using Basic Authentication, the providers listed in
When using As a consequence of the difference in the stored values between Basic and Digest Authentication, converting from Digest Authentication to Basic Authentication generally requires that all users be assigned new passwords, as their existing passwords cannot be recovered from the password storage scheme imposed on those providers which support Digest Authentication. Setting the Through the use of AuthBasicUseDigestAlgorithm
is set to MD5 . Use of other providers will result
in an error response and the client will be denied access.Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 |