Skip to content

Add comment on http_digest auth. #2170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 25, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,43 @@ A good configuration lies around at least 1000 iterations and sha512
for the hash algorithm.

.. _`PBKDF2`: http://en.wikipedia.org/wiki/PBKDF2

HTTP-Digest Authentication
--------------------------

To use HTTP-Digest authentication you need to provide a realm and a key:

.. configuration-block::

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include a xml and php example here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to. Mainly bc then I'll spend 20 - 30 minutes finding a config example to cut and paste.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is something we want in the documentation (more information in #2042). It is easier to do it now than doing it later, what will cost us a lot of time we should put into documentation new features.

Xml

<security:config>
    <firewall name="somename">
        <http-digest key="a_random_string" realm="secure-api" />
    </firewall>
</security:config>

Php

$container->loadFromExtension('security', array(
    'firewalls' => array(
        'somename' => array(
            'http_digest' => array(
                'key'   => 'a_random_string',
                'realm' => 'secure-api',
            ),
        ),
    ),
));

.. code-block:: yaml

# app/config/security.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put an empty line after .. code-block:: (same below)

security:
firewalls:
somename:
http_digest:
key: "a_random_string"
realm: "secure-api"

.. code-block:: xml

<!-- app/config/security.xml -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot a new line here 👊 ;)

<security:config>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a file comment: <!-- app/config/security.xml -->

<firewall name="somename">
<http-digest key="a_random_string" realm="secure-api" />
</firewall>
</security:config>

.. code-block:: php

// app/config/security.php
$container->loadFromExtension('security', array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here // app/config/security.php

'firewalls' => array(
'somename' => array(
'http_digest' => array(
'key' => 'a_random_string',
'realm' => 'secure-api',
),
),
),
));