@@ -332,7 +332,7 @@ The ``config`` section defines various parameters related to centralized configu
332
332
``config `` can be defined in the global :ref: `scope <configuration_scopes >` only.
333
333
334
334
* :ref: `config.reload <configuration_reference_config_reload >`
335
- * :ref: `config.context.* <configuration_reference_config_context_all >`
335
+ * :ref: `config.context.* <configuration_reference_config_context_options >`
336
336
* :ref: `config.etcd.* <configuration_reference_config_etcd >`
337
337
338
338
.. _configuration_reference_config_reload :
@@ -356,12 +356,12 @@ The ``config`` section defines various parameters related to centralized configu
356
356
| Environment variable: TT_CONFIG_RELOAD
357
357
358
358
359
- .. _ configuration_reference_config_context_all :
359
+ .. _ configuration_reference_config_context_options :
360
360
361
361
config.context.*
362
362
~~~~~~~~~~~~~~~~
363
363
364
- This section describes options related to loading configuration settings from external storage.
364
+ This section describes options related to loading configuration settings from external storage such as external files or environment variables .
365
365
366
366
* :ref: `config.context <configuration_reference_config_context >`
367
367
@@ -379,13 +379,8 @@ This section describes options related to loading configuration settings from ex
379
379
**Since: ** :doc: `3.0.0 </release/3.0.0 >`.
380
380
381
381
Specify how to load settings from external storage.
382
- There are the following storage types:
383
-
384
- * file
385
- * environment variable
386
-
387
382
For example, this option can be used to load passwords from safe storage.
388
- You can find the examples in :ref: `configuration_credentials_loading_secrets `.
383
+ You can find examples in the :ref: `configuration_credentials_loading_secrets ` section .
389
384
390
385
|
391
386
| Type: map
@@ -397,26 +392,66 @@ This section describes options related to loading configuration settings from ex
397
392
398
393
.. confval :: config.context.<name>
399
394
395
+ The name of an entity that identifies a configuration value to load.
400
396
401
397
.. _configuration_reference_config_context_name_env :
402
398
403
399
.. confval :: config.context.<name>.env
404
400
401
+ The name of an environment variable to load a configuration value from.
402
+ To load a configuration value from an environment variable, set :ref: `config.context.\< name\> .from <configuration_reference_config_context_name_from >` to ``env ``.
403
+
404
+ **Example: **
405
+
406
+ In this example, passwords are loaded from the ``DBADMIN_PASSWORD `` and ``SAMPLEUSER_PASSWORD `` environment variables:
407
+
408
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials_context_env/config.yaml
409
+ :language: yaml
410
+ :start-at: config:
411
+ :end-before: credentials:
412
+ :dedent:
413
+
414
+ See also: :ref: `configuration_credentials_loading_secrets `.
415
+
405
416
406
417
.. _configuration_reference_config_context_name_from :
407
418
408
419
.. confval :: config.context.<name>.from
409
420
421
+ The type of storage to load a configuration value from.
422
+ There are the following storage types:
423
+
424
+ * ``file ``: load a configuration value from a file.
425
+ In this case, you need to specify the path to the file using :ref: `config.context.\< name\> .file <configuration_reference_config_context_name_file >`.
426
+ * ``env ``: load a configuration value from an environment variable.
427
+ In this case, specify the environment variable name using :ref: `config.context.\< name\> .env <configuration_reference_config_context_name_env >`.
428
+
410
429
411
430
.. _configuration_reference_config_context_name_file :
412
431
413
432
.. confval :: config.context.<name>.file
414
433
434
+ The path to a file to load a configuration value from.
435
+ To load a configuration value from a file, set :ref: `config.context.\< name\> .from <configuration_reference_config_context_name_from >` to ``file ``.
436
+
437
+ **Example: **
438
+
439
+ In this example, passwords are loaded from the ``dbadmin_password.txt `` and ``sampleuser_password.txt `` files:
440
+
441
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials_context_file/config.yaml
442
+ :language: yaml
443
+ :start-at: config:
444
+ :end-before: credentials:
445
+ :dedent:
446
+
447
+ See also: :ref: `configuration_credentials_loading_secrets `.
448
+
415
449
416
450
.. _configuration_reference_config_context_name_rstrip :
417
451
418
452
.. confval :: config.context.<name>.rstrip
419
453
454
+ (Optional) Whether to strip whitespace characters and newlines from the end of data.
420
455
421
456
422
457
@@ -610,116 +645,231 @@ This section describes options related to :ref:`storing configuration in etcd <c
610
645
credentials
611
646
-----------
612
647
613
- .. TODO: https://github.com/tarantool/doc/issues/3666
648
+ The ``credentials `` section allows you to create users and grant them the specified privileges.
649
+ Learn more in :ref: `configuration_credentials `.
614
650
615
651
.. NOTE ::
616
652
617
653
``credentials `` can be defined in any :ref: `scope <configuration_scopes >`.
618
654
619
655
620
- - :ref: `credentials.roles.* <configuration_reference_credentials_roles >`
621
- - :ref: `credentials.users.* <configuration_reference_credentials_users >`
622
- - :ref: `<user_or_role_name>.privileges.* <configuration_reference_credentials_privileges >`
656
+ * :ref: `credentials.roles.* <configuration_reference_credentials_roles_options >`
657
+ * :ref: `credentials.users.* <configuration_reference_credentials_users_options >`
658
+ * :ref: `<user_or_role_name>.privileges.* <configuration_reference_credentials_privileges_options >`
623
659
624
660
625
- .. _ configuration_reference_credentials_roles :
661
+ .. _ configuration_reference_credentials_roles_options :
626
662
627
- .. confval :: credentials.roles
663
+ credentials.roles.*
664
+ ~~~~~~~~~~~~~~~~~~~
628
665
629
- | Type: map
630
- | Default: nil
631
- | Environment variable: TT_CREDENTIALS_ROLES
666
+ * :ref: `credentials.roles <configuration_reference_credentials_roles >`
632
667
668
+ * :ref: `credentials.roles.\< role_name\> .roles <configuration_reference_credentials_roles_name_roles >`
669
+ * :ref: `credentials.roles.\< role_name\> .privileges <configuration_reference_credentials_roles_name_privileges >`
633
670
634
- .. _ configuration_reference_credentials_users :
671
+ .. _ configuration_reference_credentials_roles :
635
672
636
- .. confval :: credentials.users
673
+ .. confval :: credentials.roles
637
674
638
- | Type: map
639
- | Default: nil
640
- | Environment variable: TT_CREDENTIALS_USERS
675
+ An array of :ref: ` roles < access_control_concepts_roles >` that can be granted to users or other roles.
676
+
677
+ ** Example: **
641
678
679
+ In the example below, the ``writers_space_reader `` role gets privileges to select data in the ``writers `` space:
642
680
681
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials/config.yaml
682
+ :language: yaml
683
+ :start-after: spaces: [ books ]
684
+ :end-at: spaces: [ writers ]
685
+ :dedent:
643
686
644
- .. _ configuration_reference_credentials_role :
687
+ See also: :ref: ` configuration_credentials_managing_users_roles `.
645
688
646
- credentials.roles.*
647
- ~~~~~~~~~~~~~~~~~~~
689
+ | Type: map
690
+ | Default: nil
691
+ | Environment variable: TT_CREDENTIALS_ROLES
648
692
649
693
.. _configuration_reference_credentials_roles_name_roles :
650
694
651
695
.. confval :: credentials.roles.<role_name>.roles
652
696
697
+ An array of :ref: `roles <access_control_concepts_roles >` granted to this role.
653
698
654
699
.. _configuration_reference_credentials_roles_name_privileges :
655
700
656
701
.. confval :: credentials.roles.<role_name>.privileges
657
702
658
- See :ref: `privileges <configuration_reference_credentials_privileges >` .
703
+ An array of :ref: `privileges <authentication-owners_privileges >` granted to this role .
659
704
705
+ See :ref: `\< user_or_role_name\> .privileges.* <configuration_reference_credentials_privileges_options >`.
660
706
661
- .. _configuration_reference_credentials_user :
707
+
708
+ .. _configuration_reference_credentials_users_options :
662
709
663
710
credentials.users.*
664
711
~~~~~~~~~~~~~~~~~~~
665
712
713
+ * :ref: `credentials.users <configuration_reference_credentials_users >`
714
+
715
+ * :ref: `credentials.users.\< username\> .password <configuration_reference_credentials_users_name_password >`
716
+ * :ref: `credentials.users.\< username\> .roles <configuration_reference_credentials_users_name_roles >`
717
+ * :ref: `credentials.users.\< username\> .privileges <configuration_reference_credentials_users_name_privileges >`
718
+
719
+ .. _configuration_reference_credentials_users :
720
+
721
+ .. confval :: credentials.users
722
+
723
+ An array of :ref: `users <access_control_concepts_users >`.
724
+
725
+ **Example: **
726
+
727
+ In this example, ``sampleuser `` gets the following privileges:
728
+
729
+ * Privileges granted to the ``writers_space_reader `` role.
730
+ * Privileges to select and modify data in the ``books `` space.
731
+
732
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials/config.yaml
733
+ :language: yaml
734
+ :start-at: sampleuser:
735
+ :end-at: [ books ]
736
+ :dedent:
737
+
738
+ See also: :ref: `configuration_credentials_managing_users_roles `.
739
+
740
+ | Type: map
741
+ | Default: nil
742
+ | Environment variable: TT_CREDENTIALS_USERS
743
+
666
744
667
745
.. _configuration_reference_credentials_users_name_password :
668
746
669
747
.. confval :: credentials.users.<username>.password
670
748
749
+ A user's password.
750
+
751
+ **Example: **
752
+
753
+ In the example below, a password for the ``dbadmin `` user is set:
754
+
755
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials/config.yaml
756
+ :language: yaml
757
+ :start-at: credentials:
758
+ :end-at: T0p_Secret
759
+ :dedent:
760
+
761
+ See also: :ref: `configuration_credentials_loading_secrets `.
671
762
672
763
.. _configuration_reference_credentials_users_name_roles :
673
764
674
765
.. confval :: credentials.users.<username>.roles
675
766
767
+ An array of :ref: `roles <access_control_concepts_roles >` granted to this user.
676
768
677
769
.. _configuration_reference_credentials_users_name_privileges :
678
770
679
771
.. confval :: credentials.users.<username>.privileges
680
772
681
- See :ref: `privileges <configuration_reference_credentials_privileges >` .
773
+ An array of :ref: `privileges <authentication-owners_privileges >` granted to this user .
682
774
775
+ See :ref: `\< user_or_role_name\> .privileges.* <configuration_reference_credentials_privileges_options >`.
683
776
684
- .. _configuration_reference_credentials_privileges :
777
+
778
+ .. _configuration_reference_credentials_privileges_options :
685
779
686
780
<user_or_role_name>.privileges.*
687
781
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
688
782
689
- .. _configuration_reference_credentials_users_name_privileges_permissions :
783
+ * :ref: `\< user_or_role_name\> .privileges <configuration_reference_credentials_privileges >`
784
+
785
+ * :ref: `\< user_or_role_name\> .privileges.permissions <configuration_reference_credentials_privileges_permissions >`
786
+ * :ref: `\< user_or_role_name\> .privileges.spaces <configuration_reference_credentials_privileges_spaces >`
787
+ * :ref: `\< user_or_role_name\> .privileges.functions <configuration_reference_credentials_privileges_functions >`
788
+ * :ref: `\< user_or_role_name\> .privileges.sequences <configuration_reference_credentials_privileges_sequences >`
789
+ * :ref: `\< user_or_role_name\> .privileges.lua_eval <configuration_reference_credentials_privileges_lua_eval >`
790
+ * :ref: `\< user_or_role_name\> .privileges.lua_call <configuration_reference_credentials_privileges_lua_call >`
791
+ * :ref: `\< user_or_role_name\> .privileges.sql <configuration_reference_credentials_privileges_sql >`
792
+
793
+ .. _configuration_reference_credentials_privileges :
794
+
795
+ .. confval :: <user_or_role_name>.privileges
796
+
797
+ Privileges that can be granted to a user or role using the following options:
798
+
799
+ * :ref: `credentials.users.\< username\> .privileges <configuration_reference_credentials_users_name_privileges >`
800
+ * :ref: `credentials.roles.\< role_name\> .privileges <configuration_reference_credentials_roles_name_privileges >`
801
+
802
+ .. _configuration_reference_credentials_privileges_permissions :
690
803
691
804
.. confval :: <user_or_role_name>.privileges.permissions
692
805
806
+ Permissions assigned to this user or a user with this role.
807
+
808
+ **Example: **
693
809
694
- .. _configuration_reference_credentials_users_name_privileges_spaces :
810
+ In this example, ``sampleuser `` gets privileges to select and modify data in the ``books `` space:
811
+
812
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials/config.yaml
813
+ :language: yaml
814
+ :start-at: sampleuser:
815
+ :end-at: [ books ]
816
+ :dedent:
817
+
818
+ See also: :ref: `configuration_credentials_managing_users_roles `.
819
+
820
+ .. _configuration_reference_credentials_privileges_spaces :
695
821
696
822
.. confval :: <user_or_role_name>.privileges.spaces
697
823
824
+ Spaces to which this user or a user with this role gets the specified permissions.
825
+
826
+ **Example: **
698
827
699
- .. _configuration_reference_credentials_users_name_privileges_functions :
828
+ In this example, ``sampleuser `` gets privileges to select and modify data in the ``books `` space:
829
+
830
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/credentials/config.yaml
831
+ :language: yaml
832
+ :start-at: sampleuser:
833
+ :end-at: [ books ]
834
+ :dedent:
835
+
836
+ See also: :ref: `configuration_credentials_managing_users_roles `.
837
+
838
+
839
+ .. _configuration_reference_credentials_privileges_functions :
700
840
701
841
.. confval :: <user_or_role_name>.privileges.functions
702
842
843
+ Functions to which this user or a user with this role gets the specified permissions.
703
844
704
- .. _configuration_reference_credentials_users_name_privileges_sequences :
845
+
846
+ .. _configuration_reference_credentials_privileges_sequences :
705
847
706
848
.. confval :: <user_or_role_name>.privileges.sequences
707
849
850
+ Sequences to which this user or a user with this role gets the specified permissions.
851
+
708
852
709
- .. _ configuration_reference_credentials_users_name_privileges_lua_eval :
853
+ .. _ configuration_reference_credentials_privileges_lua_eval :
710
854
711
855
.. confval :: <user_or_role_name>.privileges.lua_eval
712
856
857
+ Whether this user or a user with this role can execute arbitrary Lua code.
858
+
713
859
714
- .. _ configuration_reference_credentials_users_name_privileges_lua_call :
860
+ .. _ configuration_reference_credentials_privileges_lua_call :
715
861
716
862
.. confval :: <user_or_role_name>.privileges.lua_call
717
863
864
+ Whether this user or a user with this role can call any global user-defined Lua function.
718
865
719
- .. _configuration_reference_credentials_users_name_privileges_sql :
866
+
867
+ .. _configuration_reference_credentials_privileges_sql :
720
868
721
869
.. confval :: <user_or_role_name>.privileges.sql
722
870
871
+ Whether this user or a user with this role can execute an arbitrary SQL expression.
872
+
723
873
724
874
725
875
0 commit comments