<s>
Web	B-Protocol
API	I-Protocol
security	I-Protocol
entails	O
authenticating	O
programs	O
or	O
users	O
who	O
are	O
invoking	O
a	O
web	B-General_Concept
API	I-General_Concept
.	O
</s>
<s>
Along	O
with	O
the	O
ease	O
of	O
API	B-Application
integrations	O
come	O
the	O
difficulties	O
of	O
ensuring	O
proper	O
authentication	O
(	O
AuthN	O
)	O
and	O
authorization	O
(	O
AuthZ	O
)	O
.	O
</s>
<s>
In	O
a	O
multitenant	O
environment	O
,	O
security	O
controls	O
based	O
on	O
proper	O
AuthN	O
and	O
AuthZ	O
can	O
help	O
ensure	O
that	O
API	B-Application
access	O
is	O
limited	O
to	O
those	O
who	O
need	O
(	O
and	O
are	O
entitled	O
to	O
)	O
it	O
.	O
</s>
<s>
Appropriate	O
AuthN	O
schemes	O
enable	O
producers	O
(	O
APIs	B-Application
or	O
services	O
)	O
to	O
properly	O
identify	O
consumers	O
(	O
clients	O
or	O
calling	O
programs	O
)	O
,	O
and	O
to	O
evaluate	O
their	O
access	O
level	O
(	O
AuthZ	O
)	O
.	O
</s>
<s>
embedded	B-Architecture
systems	I-Architecture
right	O
through	O
to	O
antivirus	B-Application
software	I-Application
and	O
theoperating	O
system	O
itself.	O
"	O
</s>
<s>
Static	O
strings	O
:	O
These	O
are	O
like	O
passwords	O
that	O
are	O
provided	O
by	O
API	B-Application
's	O
to	O
consumers	O
.	O
</s>
<s>
Policy	O
&	O
attribute-based	O
access	O
control	O
:	O
policies	O
use	O
attributes	O
to	O
define	O
how	O
APIs	B-Application
can	O
be	O
invoked	O
using	O
standards	O
such	O
as	O
ALFA	O
or	O
XACML	O
.	O
</s>
<s>
In	O
static	O
strings	O
method	O
,	O
the	O
API	B-Application
caller	O
or	O
client	O
embeds	O
a	O
string	O
as	O
a	O
token	O
in	O
the	O
request	O
.	O
</s>
<s>
It	O
means	O
sending	O
the	O
user	O
's	O
password	O
over	O
the	O
network	O
in	O
clear	O
text	O
for	O
every	O
single	O
page	O
accessed	O
(	O
unless	O
a	O
secure	O
lower-level	O
protocol	O
,	O
like	O
SSL	B-Application
,	O
is	O
used	O
to	O
encrypt	O
all	O
transactions	O
)	O
.	O
</s>
<s>
Thus	O
the	O
user	O
is	O
very	O
vulnerable	O
to	O
any	O
packet	B-Protocol
sniffers	I-Protocol
on	O
the	O
net.	O
"	O
</s>
<s>
When	O
an	O
API	B-Application
is	O
protected	O
by	O
a	O
dynamic	O
token	O
,	O
there	O
is	O
a	O
time-based	O
nonce	O
inserted	O
into	O
the	O
token	O
.	O
</s>
<s>
The	O
API	B-Application
method	O
has	O
a	O
time	O
check	O
algorithm	O
,	O
and	O
if	O
the	O
token	O
is	O
expired	O
,	O
the	O
request	O
is	O
forbidden	O
.	O
</s>
<s>
"	O
An	O
example	O
of	O
such	O
token	O
is	O
JSON	B-General_Concept
Web	I-General_Concept
Token	I-General_Concept
.	O
</s>
<s>
This	O
type	O
of	O
token	O
is	O
used	O
in	O
three-legged	O
systems	O
where	O
an	O
application	B-Application
needs	O
to	O
access	O
an	O
API	B-Application
on	O
behalf	O
of	O
a	O
user	O
.	O
</s>
<s>
Instead	O
of	O
revealing	O
user	O
id	O
and	O
password	O
to	O
the	O
application	B-Application
,	O
a	O
user	O
grants	O
a	O
token	O
which	O
encapsulates	O
users	O
permission	O
for	O
the	O
application	B-Application
to	O
invoke	O
the	O
API	B-Application
.	O
</s>
<s>
The	O
OAuth	O
2.0	O
authorization	O
framework	O
enables	O
a	O
third-party	O
application	B-Application
to	O
obtain	O
limited	O
access	O
to	O
an	O
HTTP	B-Protocol
service	O
,	O
either	O
on	O
behalf	O
of	O
a	O
resource	O
owner	O
by	O
orchestrating	O
an	O
approval	O
interaction	O
between	O
the	O
resource	O
owner	O
and	O
the	O
HTTP	B-Protocol
service	O
,	O
or	O
by	O
allowing	O
the	O
third-party	O
application	B-Application
to	O
obtain	O
access	O
on	O
its	O
own	O
behalf	O
.	O
</s>
<s>
In	O
this	O
approach	O
,	O
there	O
is	O
a	O
Policy	O
Enforcement	O
Point	O
either	O
within	O
the	O
API	B-Application
itself	O
,	O
in	O
the	O
API	B-Application
framework	O
(	O
as	O
an	O
interceptor	O
or	O
message	O
handler	O
)	O
,	O
or	O
as	O
an	O
API	B-Application
gateway	O
(	O
e.g.	O
</s>
<s>
WSO2	O
,	O
Kong	O
,	O
or	O
similar	B-Application
)	O
that	O
intercepts	O
the	O
call	O
to	O
the	O
API	B-Application
and	O
/	O
or	O
the	O
response	O
back	O
from	O
the	O
API	B-Application
.	O
</s>
