saml-metadata.asciidoc 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. [float]
  35. === Parameters
  36. `--attribute <name>`:: Specifies a SAML attribute that should be
  37. included as a `<RequestedAttribute>` element in the metadata. Any attribute
  38. configured in the {es} realm is automatically included and does not need to be
  39. specified as a commandline option.
  40. `--batch`:: Do not prompt for user input.
  41. `--contacts`:: Specifies that the metadata should include one or more
  42. `<ContactPerson>` elements. The user will be prompted to enter the details for
  43. each person.
  44. `-E <KeyValuePair>`:: Configures an {es} setting.
  45. `-h, --help`:: Returns all of the command parameters.
  46. `--locale <name>`:: Specifies the locale to use for metadata elements such as
  47. `<ServiceName>`. Defaults to the JVM's default system locale.
  48. `--organisation-display-name <name`:: Specified the value of the
  49. `<OrganizationDisplayName>` element.
  50. Only valid if `--organisation-name` is also specified.
  51. `--organisation-name <name>`:: Specifies that an `<Organization>` element should
  52. be included in the metadata and provides the value for the `<OrganizationName>`.
  53. If this is specified, then `--organisation-url` must also be specified.
  54. `--organisation-url <url>`:: Specifies the value of the `<OrganizationURL>`
  55. element. This is required if `--organisation-name` is specified.
  56. `--out <file_path>`:: Specifies a path for the output files.
  57. Defaults to `saml-elasticsearch-metadata.xml`
  58. `--service-name <name>`:: Specifies the value for the `<ServiceName>` element in
  59. the metadata. Defaults to `elasticsearch`.
  60. `--signing-bundle <file_path>`:: Specifies the path to an existing key pair
  61. (in PKCS#12 format). The private key of that key pair will be used to sign
  62. the metadata file.
  63. `--signing-cert <file_path>`:: Specifies the path to an existing certificate (in
  64. PEM format) to be used for signing of the metadata file. You must also specify
  65. the `--signing-key` parameter. This parameter cannot be used with the
  66. `--signing-bundle` parameter.
  67. `--signing-key <file_path>`:: Specifies the path to an existing key (in PEM format)
  68. to be used for signing of the metadata file. You must also specify the
  69. `--signing-cert` parameter. This parameter cannot be used with the
  70. `--signing-bundle` parameter.
  71. `--signing-key-password <password>`:: Specifies the password for the signing key.
  72. It can be used with either the `--signing-key` or the `--signing-bundle` parameters.
  73. `--realm <name>`:: Specifies the name of the realm for which the metadata
  74. should be generated. This parameter is required if there is more than 1 `saml`
  75. realm in your {es} configuration.
  76. `-s, --silent`:: Shows minimal output.
  77. `-v, --verbose`:: Shows verbose output.
  78. [float]
  79. === Examples
  80. The following command generates a default metadata file for the `saml1` realm:
  81. [source, sh]
  82. --------------------------------------------------
  83. bin/elasticsearch-saml-metadata --realm saml1
  84. --------------------------------------------------
  85. The file will be written to `saml-elasticsearch-metadata.xml`.
  86. You may be prompted to provide the "friendlyName" value for any attributes that
  87. are used by the realm.
  88. The following command generates a metadata file for the `saml2` realm, with a
  89. `<ServiceName>` of `kibana-finance`, a locale of `en-GB` and includes
  90. `<ContactPerson>` elements and an `<Organization>` element:
  91. [source, sh]
  92. --------------------------------------------------
  93. bin/elasticsearch-saml-metadata --realm saml2 \
  94. --service-name kibana-finance \
  95. --locale en-GB \
  96. --contacts \
  97. --organisation-name "Mega Corp. Finance Team" \
  98. --organisation-url "http://mega.example.com/finance/"
  99. --------------------------------------------------