Abstract—This paper proposes a notion called self-verifying
execution (SVX). SVX substantially lowers several hurdles that
real-world programmers face when adopting traditional
program verification approaches. The current focus of SVX is
to verify safety properties for programs that implement cloud-
API integrations. We envision that, if adopted by real-world
programmers, the SVX approach will enable a positive
paradigm shift in the community toward more rigorous
reasoning about security goals of cloud-API protocols.
Keywords—program verification; self-verifying execution;
cloud-API integration; single-sign-on (SSO)
I. INTRODUCTION
Program verification, if widely adopted by real-world
programmers, would be a strong approach to ensure system
safety and security. Unfortunately, verification technologies
are usually too demanding for most programmers. As a result,
they are rarely adopted in the real world.
In this paper, we propose a notion called self-verifying
execution (SVX). The core idea is that every actual execution
in the system is responsible for collecting its own executed
code, and symbolically proving that the code satisfies all
desired safety properties. Essentially, SVX is proving
program code on a per-execution basis at runtime, whereas
traditional approaches try to verify a priori the safety
properties for all possible executions. In this sense, SVX falls
into the general notion of runtime verification [8]. However,
SVX’s amortized runtime cost is near zero, because all
theorems proven by SVX are symbolic and can be effectively
cached.
SVX addresses several classic hurdles that programmers
face when applying program verification in the real world.
These hurdles include: (1) the need for precise modeling of
the client’s behaviors and the runtime platform and (2) the
need to analyze executions of unbounded length, which is
hard to automate. SVX substantially lowers these hurdles,
because (1) programmers don’t need to model most aspects of
the client’s behaviors or the runtime platform, since every
execution to be verified is driven by a real user on a real
platform, and (2) the proof obligation is significantly lowered
– the theorem to prove is only about a set of executions similar
to the current execution, not about all possible executions.
Furthermore, the designer of a protocol can write an abstract
base class that sets up all the necessary interaction with the
SVX framework (including the desired safety properties), and
all concrete subclasses will be automatically verified against
the same properties without the end programmers who write
them having to know anything about SVX.
For these reasons, we believe that the SVX-style
verification is practical for real-world programmers in certain
application domains.
Current focus of SVX. An application domain in which
we are applying SVX is the security of cloud-API integration.
Many major companies provide services as cloud APIs. These
services include single-sign-on (SSO), online payment, social
sharing, cloud storage, etc. They are integrated into millions
of websites and mobile apps [7]. However, the current practice
is fairly ad-hoc – basically, programmers just read protocol
specifications and developer’s guides to implement their code,
but there is no assurance that the implementations meet the
security goals of the protocols (admittedly, the security goals
themselves are unclear in the protocol specifications). Studies
have shown many logic bugs in real websites and apps that
can cause serious security breaches. For example, an attacker
can sign into other people’s accounts or make purchases
without paying [4][9][10] [12][13][14]. This type of issue is
ranked by the Cloud Security Alliance as the No.4 cloud
computing top threat [5].
To fundamentally solve the problem, it is important to
bring rigor into the practice of cloud-API integration. We are
making an effort in this direction, and SVX is a key enabler.
Section III will explain our open-source framework that
incorporates SVX into an object-oriented design for SSO
solutions. We envision that protocol designers, service-
providing companies and end programmers write code at
different abstraction levels in this single codebase. SVX is
able to ensure that every concrete app implementation satisfies
the properties that protocol designers specify. The framework
can accommodate most major SSO solutions. We have
demonstrated a variety of implementations that integrate
Microsoft, Facebook, Google, Yahoo SSO services, which are
based on OpenID 2.0, OAuth 2.0 and OpenID Connect 1.0
protocols. All implementations are verified against a protocol-
independent safety property with no effort by the end
programmer.
We hope that the real-world adoption of SVX will enable
a paradigm shift so that our community puts more emphasis
on end-to-end properties, rather than step-by-step instructions,
when specifying cloud-API protocols.
This position paper describes the research direction
consisting of our published work [4] with several important