saml-metadata.asciidoc 5.2 KB

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