saml-metadata.asciidoc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. [role="xpack"]
  2. [testenv="gold+"]
  3. [[saml-metadata]]
  4. == elasticsearch-saml-metadata
  5. The `elasticsearch-saml-metadata` command can be used to generate a SAML 2.0 Service
  6. Provider Metadata file.
  7. [float]
  8. === Synopsis
  9. [source,shell]
  10. --------------------------------------------------
  11. bin/elasticsearch-saml-metadata
  12. [--realm <name>]
  13. [--out <file_path>] [--batch]
  14. [--attribute <name>] [--service-name <name>]
  15. [--locale <name>] [--contacts]
  16. ([--organisation-name <name>] [--organisation-display-name <name>] [--organisation-url <url>])
  17. ([--signing-bundle <file_path>] | [--signing-cert <file_path>][--signing-key <file_path>])
  18. [--signing-key-password <password>]
  19. [-E <KeyValuePair>]
  20. [-h, --help] ([-s, --silent] | [-v, --verbose])
  21. --------------------------------------------------
  22. [float]
  23. === Description
  24. The SAML 2.0 specification provides a mechanism for Service Providers to
  25. describe their capabilities and configuration using a _metadata file_.
  26. The `elasticsearch-saml-metadata` command generates such a file, based on the
  27. configuration of a SAML realm in {es}.
  28. Some SAML Identity Providers will allow you to automatically import a metadata
  29. file when you configure the Elastic Stack as a Service Provider.
  30. You can optionally select to digitally sign the metadata file in order to
  31. ensure its integrity and authenticity before sharing it with the Identity Provider.
  32. The key used for signing the metadata file need not necessarily be the same as
  33. the keys already used in the saml realm configuration for SAML message signing.
  34. If your {es} keystore is password protected, you
  35. are prompted to enter the password when you run the
  36. `elasticsearch-saml-metadata` command.
  37. [float]
  38. === Parameters
  39. `--attribute <name>`:: Specifies a SAML attribute that should be
  40. included as a `<RequestedAttribute>` element in the metadata. Any attribute
  41. configured in the {es} realm is automatically included and does not need to be
  42. specified as a commandline option.
  43. `--batch`:: Do not prompt for user input.
  44. `--contacts`:: Specifies that the metadata should include one or more
  45. `<ContactPerson>` elements. The user will be prompted to enter the details for
  46. each person.
  47. `-E <KeyValuePair>`:: Configures an {es} setting.
  48. `-h, --help`:: Returns all of the command parameters.
  49. `--locale <name>`:: Specifies the locale to use for metadata elements such as
  50. `<ServiceName>`. Defaults to the JVM's default system locale.
  51. `--organisation-display-name <name`:: Specified the value of the
  52. `<OrganizationDisplayName>` element.
  53. Only valid if `--organisation-name` is also specified.
  54. `--organisation-name <name>`:: Specifies that an `<Organization>` element should
  55. be included in the metadata and provides the value for the `<OrganizationName>`.
  56. If this is specified, then `--organisation-url` must also be specified.
  57. `--organisation-url <url>`:: Specifies the value of the `<OrganizationURL>`
  58. element. This is required if `--organisation-name` is specified.
  59. `--out <file_path>`:: Specifies a path for the output files.
  60. Defaults to `saml-elasticsearch-metadata.xml`
  61. `--service-name <name>`:: Specifies the value for the `<ServiceName>` element in
  62. the metadata. Defaults to `elasticsearch`.
  63. `--signing-bundle <file_path>`:: Specifies the path to an existing key pair
  64. (in PKCS#12 format). The private key of that key pair will be used to sign
  65. the metadata file.
  66. `--signing-cert <file_path>`:: Specifies the path to an existing certificate (in
  67. PEM format) to be used for signing of the metadata file. You must also specify
  68. the `--signing-key` parameter. This parameter cannot be used with the
  69. `--signing-bundle` parameter.
  70. `--signing-key <file_path>`:: Specifies the path to an existing key (in PEM format)
  71. to be used for signing of the metadata file. You must also specify the
  72. `--signing-cert` parameter. This parameter cannot be used with the
  73. `--signing-bundle` parameter.
  74. `--signing-key-password <password>`:: Specifies the password for the signing key.
  75. It can be used with either the `--signing-key` or the `--signing-bundle` parameters.
  76. `--realm <name>`:: Specifies the name of the realm for which the metadata
  77. should be generated. This parameter is required if there is more than 1 `saml`
  78. realm in your {es} configuration.
  79. `-s, --silent`:: Shows minimal output.
  80. `-v, --verbose`:: Shows verbose output.
  81. [float]
  82. === Examples
  83. The following command generates a default metadata file for the `saml1` realm:
  84. [source, sh]
  85. --------------------------------------------------
  86. bin/elasticsearch-saml-metadata --realm saml1
  87. --------------------------------------------------
  88. The file will be written to `saml-elasticsearch-metadata.xml`.
  89. You may be prompted to provide the "friendlyName" value for any attributes that
  90. are used by the realm.
  91. The following command generates a metadata file for the `saml2` realm, with a
  92. `<ServiceName>` of `kibana-finance`, a locale of `en-GB` and includes
  93. `<ContactPerson>` elements and an `<Organization>` element:
  94. [source, sh]
  95. --------------------------------------------------
  96. bin/elasticsearch-saml-metadata --realm saml2 \
  97. --service-name kibana-finance \
  98. --locale en-GB \
  99. --contacts \
  100. --organisation-name "Mega Corp. Finance Team" \
  101. --organisation-url "http://mega.example.com/finance/"
  102. --------------------------------------------------