Securing layers
We want to protect the data set contained in the Packt workspace from unauthorized access, while leaving the remaining layers freely available to all users. In this section, we will associate layers and roles:
- Under the
Security
section on the left pane, selectData
. The rules list shows the two shipped with the default GeoServer configuration. Click on theAdd new rule
link:
Note
The *.*.r
rule is associated with the *
roles. This means that every user, including the anonymous one, can access any layer from any workspace configured on GeoServer. The general form of the rule is then as in this code: workspace.layer.access_mode
.
- In the rule editing page, select
Packt
as theWorkspace
. Leave*
as aLayer
. Since we want to protect all layers in this workspace, theAccess mode
should beRead
. Select thePACKT_READER
role and move it to the right list by clicking on the arrow. Click on theSave
button to create the reading rule, as shown in the following screenshot:
- Repeat the previous...