Skip to content

Commit

Permalink
remove Priv
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Oct 1, 2020
1 parent fbad477 commit 987a21f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 145 deletions.
32 changes: 0 additions & 32 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from cylc.flow import LOG
from cylc.flow import __version__ as CYLC_VERSION
from cylc.flow.hostuserutil import get_user_home
from cylc.flow.network.authorisation import Priv
from cylc.flow.parsec.config import ParsecConfig, ConfigNode as Conf
from cylc.flow.parsec.exceptions import ParsecError
from cylc.flow.parsec.upgrade import upgrader
Expand Down Expand Up @@ -597,37 +596,6 @@
host if you have to use the *hardwired* self-identification method.
''')

# suite
with Conf('authentication', desc='''
Authentication of client programs with suite server programs can be
configured here, and overridden in suites if necessary with
:cylc:conf:`flow.cylc[cylc][authentication]`.
The suite-specific passphrase must be installed on a user's account to
authorize full control privileges (see
:ref:`ConnectionAuthentication`). In the future we plan to move to a
more traditional user account model so that each authorized user can
have their own password.
'''):
# Allow owners to grant public shutdown rights at the most, not full
# control.
Conf(
'public',
VDR.V_STRING,
default=Priv.STATE_TOTALS.name.lower().replace('_', '-'),
options=[
level.name.lower().replace('_', '-')
for level in [
Priv.IDENTITY, Priv.DESCRIPTION,
Priv.STATE_TOTALS, Priv.READ, Priv.SHUTDOWN
]
],
desc='''
This sets the client privilege level for public access - i.e.
no suite passphrase required.
'''
)

# suite
with Conf('suite servers', desc='''
Configure allowed suite hosts and ports for starting up (running or
Expand Down
107 changes: 0 additions & 107 deletions cylc/flow/network/authorisation.py

This file was deleted.

6 changes: 0 additions & 6 deletions cylc/flow/network/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from cylc.flow import LOG
from cylc.flow.network import encode_, decode_, ZMQSocketBase
from cylc.flow.network.authorisation import Priv, authorise
from cylc.flow.network.graphql import (
CylcGraphQLBackend, IgnoreFieldMiddleware, instantiate_middleware
)
Expand Down Expand Up @@ -259,7 +258,6 @@ def register_endpoints(self):
for name, obj in self.__class__.__dict__.items()
if hasattr(obj, 'exposed')}

@authorise(Priv.IDENTITY)
@expose
def api(self, endpoint=None):
"""Return information about this API.
Expand Down Expand Up @@ -292,7 +290,6 @@ def api(self, endpoint=None):
return '%s\n%s' % (head, tail)
return 'No method by name "%s"' % endpoint

@authorise(Priv.READ)
@expose
def graphql(self, request_string=None, variables=None):
"""Return the GraphQL scheme execution result.
Expand Down Expand Up @@ -335,7 +332,6 @@ def graphql(self, request_string=None, variables=None):
return errors
return executed.data

@authorise(Priv.READ)
@expose
def get_graph_raw(self, start_point_string, stop_point_string,
group_nodes=None, ungroup_nodes=None,
Expand Down Expand Up @@ -400,7 +396,6 @@ def get_graph_raw(self, start_point_string, stop_point_string,
ungroup_all=ungroup_all)

# UIServer Data Commands
@authorise(Priv.READ)
@expose
def pb_entire_workflow(self):
"""Send the entire data-store in a single Protobuf message.
Expand All @@ -413,7 +408,6 @@ def pb_entire_workflow(self):
pb_msg = self.schd.data_store_mgr.get_entire_workflow()
return pb_msg.SerializeToString()

@authorise(Priv.READ)
@expose
def pb_data_elements(self, element_type):
"""Send the specified data elements in delta form.
Expand Down

0 comments on commit 987a21f

Please sign in to comment.