When you initially install Shield, a 30 day trial license is installed that allows access to all features. At the end of the trial period, you can https://www.elastic.co/subscriptions/[purchase a subscription] to keep using the full functionality of Shield along with Marvel and Watcher.
IMPORTANT: When your license expires, Shield operates in a degraded mode where access to the Elasticsearch cluster health, cluster stats, and index stats APIs is blocked. Shield keeps on protecting your cluster, but you won't be able to monitor its operation until you update your license. For more information, see <<license-expiration, License Expiration>>.
License expiration should never be a surprise. If you're using Marvel, a license expiration
warning is displayed prominently if your license expires within 30 days. Warnings are
also displayed on startup and written to the Elasticsearch log starting 30 days from the expiration date. These error messages tell you when the license expires and what features will be disabled if
# License will expire on [Thursday, November 12, 2015]. If you have a new license, please update it.
# Otherwise, please reach out to your support contact.
#
# Commercial plugins operate with reduced functionality on license expiration:
# - marvel
# - The agent will stop collecting cluster and indices metrics
# - shield
# - Cluster health, cluster stats and indices stats operations are blocked
# - All data operations (read and write) continue to work
--------------------------------------------
Once the license expires, calls to the cluster health, cluster stats, and index stats APIs
fail with a `ElasticsearchSecurityException` and return a 401 HTTP status code:
[source,sh]
--------------------------------------------
{
"error": {
"root_cause": [{
"type": "security_exception",
"reason": "current license is non-compliant for [shield]",
"license.expired.feature": "shield"
}],
"type": "security_exception",
"reason": "current license is non-compliant for [shield]",
"license.expired.feature": "shield"
},
"status": 401
}
--------------------------------------------
This enables automatic monitoring systems to easily detect the license failure without immediately impacting other users.
IMPORTANT: You should update your license as soon as possible. You're essentially flying blind when running with an expired license. Access to the cluster health and stats APIs is critical
for monitoring and managing an Elasticsearch cluster.