<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>A. Sorici);</journal-title>
      </journal-title-group>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>CASHMERE: Context-based Authorization in Hypermedia Agent Environments</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexandru Sorici</string-name>
          <email>alexandru.sorici@upb.ro</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Adina Magda Florea</string-name>
          <email>adina.florea@upb.ro</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Hypermedia MAS, Web-of-Things, Context, RDF Stream Processing, Context-Based Access Control</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National University of Science and Technology POLITEHNICA Bucharest</institution>
          ,
          <addr-line>313 Splaiul Independentei, Bucharest</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>Hypermedia Multi-Agent Systems (HMAS) promote an alignment between MAS engineering and the Web architecture to enable development of large, open, dynamic and long-lived interaction systems. HMAS environments exploit HATEOAS to facilitate the discovery of the resources whose afordances are required by agents. An insuficiently addressed issue in current HMAS frameworks is that of enabling authorized access to resources in a manner exploiting the dynamics of multi-agent environments. We propose a framework for context-based authorizations for access and discovery of resources in an HMAS, inspired by work on Attributed-Based Access Control and RDF Stream Reasoning. We detail the design of the framework functionality and the integration with current HMAS platforms, highlighting advantages and challenges of the approach.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR
ceur-ws.org</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>
        Hypermedia Multi Agent Systems (HMAS) are a design paradigm promoting MAS engineering
that is aligned with the web architecture to enable large, open, dynamic and long-lived
interaction systems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. HMAS use synergies between the Agent and Artifacts (A&amp;A) meta-model [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
for agent environment programming and the Web-of-Things (WoT) W3C Thing Description
(TD) specification
      </p>
      <p>1, such that artifacts, organized into workspaces are represented on the web
as resources having properties and afording</p>
      <p>actions and event notifications.</p>
      <p>HMAS are characterized by an increased interaction dynamics, since agents can enter or exit
an environment, can opt to change the role they play in a situation, can start or stop providing a
service. This increased logical mobility of agents and the open and long-lived nature of HMAS
create the need to apply context-aware boundaries to the interactions that take place. In turn,
this requires a dynamic control of authorized access to the services provided by artifact resources
in a hypermedia MAS environment.</p>
      <p>A simple scenario exemplifies the matter: a research facility implementing a visual event
notification system using smart lights in each lab. The smart lights are available as artifacts
CEUR
Workshop
Proceedings
in an HMAS environment and digital assistants of researchers can discover and use them.
However, management requires that interaction with any smart light be allowed only for
employed personnel who are physically present in the labs.</p>
      <p>
        The dynamic access control issue remains insuficiently addressed (see preliminary design
work on signifiers [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]) in the design of existing HMAS frameworks and is, thus, a focus of the
current work, which we title CASHMERE. Concretely, we describe a solution to: (i) represent
context information that is used in dynamic access authorization decision making, (ii) implement
an RDF stream reasoning mechanism to identify situations of shared interaction context, which
constitute ground for granting an authorization, (iii) represent and validate access authorizations
using the SOLID Web Access Control (WAC) specifications 2, and (iv) describe the integration
of the proposed solution with a hypermedia MAS (Yggdrasil [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]).
      </p>
    </sec>
    <sec id="sec-3">
      <title>2. CASHMERE: Design and semantic web technologies in use</title>
      <p>The CASHMERE context-based authorization mechanism (illustrated in Figure 1) exploits an
opportunity cost of combining the following semantic web technologies.</p>
      <p>
        Context Representation (Step 1 in Fig. 1). We interpret context as ”any information that
can be used to characterize the situation of an entity. An entity is a person, place, or object that
is considered relevant to the interaction between a user and an application, including the user
and applications themselves” [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. To represent context information we employ the CONSERT
Ontology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which uses reification to describe information in terms of ContextAssertions
(denoting the predicate), which bind several ContextEntities. This form allows easy annotations of
context information, particularly regarding time of assertion, temporal validity and provenance.
      </p>
      <p>
        Shared Context Modeling (Step 2 in Fig. 1). The CONSERT Model identifies
ContextDimensions and ContextDomains as means to manage and provision context information in a
system [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. ContextDimenstions provide perspectives of logical partition of information (e.g.
based on location, based on activity, based on organizational relations). ContextDomains are
view instances obtained from one or more perspectives (e.g. employed users physically present in
a research lab, Teaching Activity X, membership relation Y). We define two entities as sharing
      </p>
      <sec id="sec-3-1">
        <title>2SOLID Web Access Control specifications: https://solidproject.org/TR/wac</title>
        <p>context within an application domain if a subset of context information from or about them
is included in at least one ContextDomain of the application. The shared context relation is
formalized as a group membership whereby entities that share context belong to the same
ContextDomain Group.</p>
        <p>
          RDF Stream Processing for Shared Context Identification (Step 2 in Fig. 1). Context
information can change in time (e.g. due to agent mobility, changes in current activity) and this
requires reasoning methods which can manage such changes. We identify conditions for shared
context by using RDF Stream processing (RSP) frameworks. Specifically, we use the newest
C-SPARQL [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] iteration which follows the RSP-QL [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] semantics of interpreting time-varying
RDF graphs. RSP-QL introduces new SPARQL operators which (i) define the duration and
trigger conditions for evaluation windows and (ii) describe the semantics of evaluation output
(either as new streams or a snapshot output). In CASHMERE, a ContextDomain Group runs
C-SPARQL queries to output streams that indicate membership acceptance (using CONSTRUCT
ISTREAM operators) or membership revocation (using CONSTRUCT DSTREAM operators) with
respect to the agents and artifacts that are bound by the RDF stream processing query.
        </p>
        <p>SOLID Web Access Control Authorizations (Step 3 in Fig. 1). CASHMERE uses WAC
specifications and the ACL ontology to transform the identified shared ContextDomain
membership into an actionable authorization mechanism. Authorized agents are identified by a
WebID 3. An artifact in an HMAS advertises its list of authorizations using a rel=acl Link
header. Authorizations provide Read, Write, Append or Control access. The acl:agentGroup
mode of identifying authorization subject is used in CASHMERE, describing an instance of
a vcard:Group which can contain individual agents as members. This maps directly to the
mechanism of ContextDomain membership CONSTRUCT outputs.</p>
        <p>The novelty of our work lies in reasoning about context information itself as the main
conditioning factor to grant authorizations, leading to a very flexible and extensible method of
defining situations that count as an interest and legitimate ground for a human or software agent
to access data and services in a hypermedia environment.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Overview of HMAS Integration</title>
      <p>
        Figure 2 shows the extension of element types (Artifacts, Workspaces, Environments, Search
Services) of the Yggdrasil HMAS platform [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] with their typical WAC authorizations. The service
running C-SPARQL inferences to produce membership instances is Lab308CtxDomainGroup,
outputting them as triples of form Lab308CtxDomain vcard:hasMember ex:agent (see Listing
1 as an example inference). The body of the query in Listing 1 distinguishes three context
information input sources (diferent SPARQL graphs), depending on the mode of acquisition:
static assertions (which identify the agent - line 11), profiled assertions (the employment status
of the agent - lines 12-20) and a named window defining the stream of sensed PersonLocated
ContextAssertion instances (lines 21-25). Notice that, since the precis:WorksAt ContextAssertion
instance is a profiled one, it is interrogated for its TemporalValidityAnnotation (lines 17-19),
which is then used to check validity of the employment status (line 27).
      </p>
      <sec id="sec-4-1">
        <title>3WebID specifications: https://www.w3.org/2005/Incubator/webid/spec/</title>
        <p>authorization determination mechanism. Workspaces enable inclusive access (any agent having
a FOAF profile) by default (item B. in Fig 2), while individual artifacts dynamically restrict access
based on ContextDomain membership (item A. in Fig 2). Control for change in access control
policies is defined at HMAS environment level (item C. in Fig 2). The HMAS platform facilitates
the validation of a context-based authorization for all HMAS resources that use a context-based
access. It does so by running a federated SPARQL query against all ContextDomain Groups
observed by a HMAS resource).</p>
      </sec>
      <sec id="sec-4-2">
        <title>Listing 1: Demonstrator scenario shared context identification query</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Conclusion</title>
      <p>CASHMERE exploits a technological fit to ofer a modular solution for context-based access
authorization in A&amp;A HMAS platforms, using a flexible context-representation method
(CONSERT), a time-aware shared context identification method (RSP using C-SPARQL) and an
authorization representation and validation mechanism following SOLID WAC specifications.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work has been supported by funding under grant agreement PN-III-P1-1.1-PD-2021-0756
from the Romanian National Research, Development and Innovation Plan.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ciortea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <article-title>Engineering world-wide multi-agent systems with hypermedia</article-title>
          ,
          <source>in: Engineering Multi-Agent Systems: 6th International Workshop</source>
          , EMAS 2018, Stockholm, Sweden,
          <source>July 14-15</source>
          ,
          <year>2018</year>
          ,
          <source>Revised Selected Papers 6</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>285</fpage>
          -
          <lpage>301</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Piunti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Viroli</surname>
          </string-name>
          ,
          <article-title>Environment programming in multi-agent systems: an artifactbased perspective</article-title>
          ,
          <source>Autonomous Agents and Multi-Agent Systems</source>
          <volume>23</volume>
          (
          <year>2011</year>
          )
          <fpage>158</fpage>
          -
          <lpage>192</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Vachtsevanou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ciortea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mayer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lemée</surname>
          </string-name>
          ,
          <article-title>Signifiers as a first-class abstraction in hypermedia multi-agent systems</article-title>
          ,
          <source>arXiv preprint arXiv:2302.06970</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Dey</surname>
          </string-name>
          ,
          <article-title>Understanding and using context, Personal and ubiquitous computing 5 (</article-title>
          <year>2001</year>
          )
          <fpage>4</fpage>
          -
          <lpage>7</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sorici</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Picard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zimmermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Florea</surname>
          </string-name>
          , Consert:
          <article-title>Applying semantic web technologies to context modeling in ambient intelligence</article-title>
          ,
          <source>Computers &amp; Electrical Engineering</source>
          <volume>44</volume>
          (
          <year>2015</year>
          )
          <fpage>280</fpage>
          -
          <lpage>306</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sorici</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Picard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Florea</surname>
          </string-name>
          <article-title>, Multi-agent based flexible deployment of context management in ambient intelligence applications</article-title>
          , in: Advances in Practical Applications of Agents,
          <string-name>
            <surname>Multi-Agent Systems</surname>
          </string-name>
          , and Sustainability:
          <source>The PAAMS Collection: 13th International Conference, Proceedings 13</source>
          , Springer,
          <year>2015</year>
          , pp.
          <fpage>225</fpage>
          -
          <lpage>239</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Barbieri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Braga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ceri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. D.</given-names>
            <surname>VALLE</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Grossniklaus</surname>
          </string-name>
          ,
          <article-title>C-sparql: a continuous query language for rdf data streams</article-title>
          ,
          <source>International Journal of Semantic Computing</source>
          <volume>4</volume>
          (
          <year>2010</year>
          )
          <fpage>3</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Dell'Aglio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. Della</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Calbimonte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Corcho</surname>
          </string-name>
          ,
          <article-title>Rsp-ql semantics: A unifying query model to explain heterogeneity of rdf stream processing systems</article-title>
          ,
          <source>International Journal on Semantic Web and Information Systems (IJSWIS) 10</source>
          (
          <year>2014</year>
          )
          <fpage>17</fpage>
          -
          <lpage>44</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>