Skip to content

Commit c6149ab

Browse files
authored
Fix minor problems with the new security module (#452)
- The API documentation was missing - The documentation for it is written like a section and distorts the menu. The sections are converted to subsections. - The code sample was missing a new line, and was resulting in error. - The documentation at the client constructor had a wrong module name - Removed the `security` folder and moved everything to `security` module to match with the style of the rest of the code base.
1 parent a6da8ef commit c6149ab

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

docs/api/modules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ API Documentation
1414
partition
1515
predicate
1616
proxy/modules
17+
security
1718
serialization
1819
sql
1920
transaction

docs/api/security.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Security
2+
========
3+
4+
.. automodule:: hazelcast.security

docs/securing_client_connection.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ and ``ssl_keyfile`` on top of the other TLS/SSL configurations. See the
261261
section for the details of these options.
262262

263263
Username/Password Authentication
264-
================================
264+
--------------------------------
265265

266266
You can protect your cluster using a username and password pair.
267267
In order to use it, enable it in member configuration:
@@ -293,7 +293,7 @@ Check out the documentation on `Password Credentials
293293
of the Hazelcast Documentation.
294294

295295
Token-Based Authentication
296-
==========================
296+
--------------------------
297297

298298
Python client supports token-based authentication via token providers.
299299
A token provider is a class derived from :class:`hazelcast.security.TokenProvider`.
@@ -316,6 +316,7 @@ In order to use token based authentication, first define in the member configura
316316
Using :class:`hazelcast.security.BasicTokenProvider` you can pass the given token the member:
317317

318318
.. code:: python
319+
319320
token_provider = BasicTokenProvider("MY-SECRET")
320321
client = hazelcast.HazelcastClient(
321322
token_provider=token_provider

hazelcast/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ class SomeClassSerializer(StreamSerializer):
329329
successful replicas. By default, set to ``False`` (do not fail).
330330
creds_username (str): Username for credentials authentication (Enterprise feature).
331331
creds_password (str): Password for credentials authentication (Enterprise feature).
332-
token_provider (hazelcast.token_provider.TokenProvider): Token provider for custom authentication (Enterprise feature).
333-
Note that token_provider setting has priority over credentials settings.
332+
token_provider (hazelcast.security.TokenProvider): Token provider for
333+
custom authentication (Enterprise feature). Note that token_provider
334+
setting has priority over credentials settings.
334335
"""
335336

336337
_CLIENT_ID = AtomicInteger()
File renamed without changes.

hazelcast/security/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/unit/token_provider_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from hazelcast.security.token_provider import BasicTokenProvider
3+
from hazelcast.security import BasicTokenProvider
44

55

66
class BasicTokenProviderTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)