Workspaces and Access Control
HydroServer is built to handle not only multiple users with varying permission levels for one organization, but multiple organizations that may be sharing the same instance of HydroServer. This is accomplished primarily through workspaces.
Workspaces
Think of a workspace as Google Drive or Microsoft OneDrive folder. The person who creates the folder is automatically the owner. They can then share the folder with anyone they want and give them either edit or view only permissions. Any one person can have different permissions for various folders shared with them.
Ownership within the HydroServer system is user-centric, meaning individual user accounts, rather than organizations, own the sites, datastreams, and metadata contained within a Workspace. Each user's account is the central point of control and responsibility for their associated hydrologic data. Organization information, when present, acts as an extension of the user's information. A user may be associated with an organization, but it is the user's account that maintains ownership and control over the data.
All resources in HydroServer (monitoring sites, datastreams, etc.) are handled within the context of a workspace. When you create a new site, you'll first decide which workspace it belongs to. It then inherits all the permissions of that workspace.
User Roles
Each collaborator in a workspace is assigned a role. A role is a set of permissions configurable at the resource level. For example, you can give a role read only access to the monitoring sites in a workspace, but give it full edit access to the datastreams of a workspace. The workspace owner has full control of the workspace. By default, HydroServer also ships with Editor, Viewer, and Data Loader roles that can be assigned to collaborators and service accounts, and an administrator can configure additional roles.
The following table is a comparison of permissions for the owner and the default roles of a workspace.
| Permission | Owner | Editor | Viewer | Data Loader |
|---|---|---|---|---|
| Rename, transfer, edit privacy of workspace | Yes | No | No | No |
| Invite new workspace collaborators | Yes | Yes | No | No |
| Create, update, delete sites, datastreams, and metadata | Yes | Yes | No | No |
| Stream observations into datastreams | Yes | Yes | No | Yes |
| Set up Job Orchestration System tasks | Yes | Yes | No | No |
| View public and private data within workspace | Yes | Yes | Yes | Yes |
Service Accounts and API Keys
Remote systems or applications may need to authenticate with HydroServer in data-loading, retrieval, or analysis workflows. Giving these systems your username and password is risky because they receive all of your permissions. Instead, create a service account, assign it the minimum workspace role required for its job, and authenticate it with the generated API key. Service accounts can use roles such as Data Loader, Editor, or Viewer just like user collaborators.
Data Privacy and Visibility
It's assumed in a HydroServer setup that you want your data to be publicly viewable. By default, when you load data to a datastream, any guest of your site will be able to view that data and all related metadata. These privacy settings can be changed at the workspace, site, and datastream levels.
Workspace Privacy: This setting determines whether a workspace is private or public. If your workspace is private, all sites, datastreams, and associated metadata will only be accessible to the workspace owner and collaborators.
Site Privacy: This setting determines whether your site is private or public. If you set your site to private, it means that only the workspace owners and collaborators can view the site and all associated datastreams through the website or API. This is like having a closed folder that only selected people can open. This allows users to set some sites as public and others as private within a public workspace.
Datastream Privacy: This setting is about who can see a specific datastream at your site. Even if your site is public, you might want to keep certain datastreams of that site private. When this setting is on, it means that only the workspace owners and collaborators can view this particular datastream's details and data.
Datastream Data Download Restriction: When this setting is on, the public can't download or query the datastream's data, through the Data Management Web Application or any API, including the SensorThings API and CSV downloads. The datastream and its metadata stay public, including its observation count and the time range its observations cover, so guests can see that the data exists, but can't download or query it. Only the workspace owner and collaborators whose role can view observations can download and query the data.
HydroServer checks privacy at all three levels. A datastream and its observations are publicly accessible only when its workspace, monitoring site, and the datastream itself are all public.
Making a site private blocks public access to its datastreams and observations. Each datastream keeps its own privacy (datastream.isPrivate) and data download restriction (datastream.isRestricted) settings.
For example, if you make the site public again and its workspace is also public, datastreams that were public before become publicly accessible again. Datastreams marked private stay private, and datastreams with restricted data download stay restricted.
Datastream privacy and data download restriction are independent settings. A private datastream hides its data whether or not its data download is restricted, but its restriction setting is kept. If you make a datastream private and then public again, its data download restriction is unchanged.
