Skip to content

Conversation

@albertzaharovits
Copy link
Contributor

Documents how to backup and restore the configuration for security features.

This started of as documenting "Backup .security" but escalated fast, because it required explaining the relation with all the other configurations (eg which one goes first) . Documenting just the configuration part from the .security index would have raised more questions than answers, IMO.

@albertzaharovits albertzaharovits added >docs General docs changes :Security/Security Security issues without another label v8.0.0 v7.2.0 v7.3.0 v6.8.1 labels Jun 6, 2019
@albertzaharovits albertzaharovits requested review from lcawl and tvernum June 6, 2019 23:52
@albertzaharovits albertzaharovits self-assigned this Jun 6, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@lcawl
Copy link
Contributor

lcawl commented Jun 12, 2019

I'm tempted to move this up a level e.g. as a peer to the "Configuring security" section, so that we can break this into multiple pages. Do you have a strong preference for keeping it all on one long page?

'
--------------------------------------------------

NOTE: Restoring the global state is optional, but it will help make sure the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is information missing here after "the"

--

. Cherry-pick and
<<cluster-update-settings,apply the persistent secure settings>> from earlier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this step needs more information since it wasn't clear to me what "earlier" was referring to or what exact steps I needed to perform here.

@albertzaharovits
Copy link
Contributor Author

albertzaharovits commented Jul 9, 2019

@lcawl I have skipped a test that added a user because the fixture was complaining that security must be explicitly enabled for a trial license.
In addition, I have merged backup-security-config.asciidoc and restore-security-config.asciidoc in a single file because //TEST [continued] does not work across files. I believe it's better to have them separated but I don't know how to do that (without duplicating test setups in the second file). Lastly, I have added NOTCONSOLE to some curl cmds that should be run from the local shell.

@albertzaharovits albertzaharovits merged commit 3538cff into elastic:master Jul 10, 2019
@albertzaharovits albertzaharovits deleted the backup-restore-security-configuration branch July 10, 2019 11:05
@albertzaharovits
Copy link
Contributor Author

@lcawl This commit does not apply cleanly to 6.8, yet the technical bits (the snapshot_user role) would work in 6.8 .
I know this is part of a bigger docs overhauling, do you think it is worthy/feasible a backport to 6.8 ? Security conf backups don't work across major versions, so the benefits of a backup in 6.8 are less important.

albertzaharovits added a commit that referenced this pull request Jul 10, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
albertzaharovits added a commit that referenced this pull request Jul 10, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
@lcawl
Copy link
Contributor

lcawl commented Jul 11, 2019

At this time, that Administering Elasticsearch section only exists in 7.3 and later branches so if there's not a strong motivation for making it work there, I think we should refrain from backporting to that branch.

@albertzaharovits
Copy link
Contributor Author

albertzaharovits commented Jul 11, 2019

@tvernum this has been merged to 7.3, 7.x and master .
But we did a mistake to not document at the time we had parts of the feature ready. In this case, snapshot_user role exists since 6.7 and tokens were moved to a dedicated index since 7.2 .
I think "Administering Elasticsearch" doc section should be backported to 7.0 (It is prob of little value to backport to 6.8 since security restores don't work across major versions). I chatted with @lcawl about the possibility to backport the doc restructuring to 7.0 and there was no opposition.

So, do you think we should backport this doc section to all 7.x versions?

albertzaharovits added a commit that referenced this pull request Jul 16, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
albertzaharovits added a commit that referenced this pull request Jul 16, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
albertzaharovits added a commit that referenced this pull request Jul 16, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
@albertzaharovits
Copy link
Contributor Author

Backported to 7.0, 7.1 and 7.2.

albertzaharovits added a commit that referenced this pull request Jul 16, 2019
albertzaharovits added a commit that referenced this pull request Jul 16, 2019
albertzaharovits added a commit that referenced this pull request Jul 16, 2019
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jul 16, 2019
albertzaharovits added a commit that referenced this pull request Jul 17, 2019
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Tim Vernum <[email protected]>
@albertzaharovits
Copy link
Contributor Author

Backports to 7.0 and 7.1 have been reverted. We've discussed this in our weekly meeting. There is nothing in this PR that would justify it be an exception to our usual backporting strategy. Moreover, before 7.2, there were security tokens stored in the .security index, so the wording in the docs would not be 100% accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants