Authentication Process

DEV-8: AppServer™ Mode Case Studies
Simon Epps
Solutions Engineer
Agenda
 AppServer Fundamentals
• AppServer Environment
 Distributed Computing Design Considerations
 AppServer Operating Modes
 Case Studies
2
© 2008 Progress Software Corporation
AppServer Environment
Broker
Clients
NameServer
The Components
Business
Logic
Data
Agents
AppServer
3
© 2008 Progress Software Corporation
AppServer Environment
NameServer
AppServer2
Client
1
NameServer
App1
AppServer1
App1
AppServer3
App1
4
© 2008 Progress Software Corporation
AppServer Environment
Inside the AppServer Agent
5
Agent Startup
Session
Begin Request
Connection
Client Connect
Request
 Three levels of
execution
context
 Differ in when
they are set
and how long
they last
 Operating
modes handle
context
differently
End Request
Client Disconnect
Agent Shutdown
© 2008 Progress Software Corporation
Agenda
 AppServer Fundamentals
 Distributed Computing Design Considerations
•
•
•
•
Authentication and Authorization
User Context Management
Application State Management
Performance and Scalability
 AppServer Operating Modes
 Case Studies
6
© 2008 Progress Software Corporation
Authentication and Authorization
Authentication Process





Get the user login
Lookup the user-id in authentication system
Validate a “shared-secret”
Check that the user account is valid
Create login context info container
• Identify using unique token
• Seal to prevent tampering
7
© 2008 Progress Software Corporation
Authentication and Authorization
Authorization Process
 Lookup the login context info
 Lookup user’s access-control data
 Check access-controls on access to
application resources
8
© 2008 Progress Software Corporation
Authentication
Client/Server Environment
Client
User
Input
Collect Login
Credentials
Lookup User
Account
Authenticate User
User Accts
Retrieve Acct Info
Create Login Context
Access
Control
Audit Log
9
© 2008 Progress Software Corporation
Authorization
Client/Server Environment
Client
Data
User
Input
Authorization
Manager
Business
Logic
Access
Control
10
Audit Log
© 2008 Progress Software Corporation
Authentication
N-Tier Environment
Client
User
Input
Collect
Login
Credentials
Application Server
Lookup User
Account
User Accts
Authenticate User
Request
Authentication
Retrieve Acct Info
Retain Token
Create Login Context
Access
Control
Audit Log
11
© 2008 Progress Software Corporation
Authorization
N-Tier Environment
Client
Application Server
User Accts
User
Input
Service
Request
Authorization
Manager
Business
Logic
Access
Control
12
Audit Log
© 2008 Progress Software Corporation
User Context Management
Client/Server
Client
User
Input
User Authentication
Process
DEFINE VAR user_name as char.
DEFINE VAR user_id as char.
User Accts
Business
Logic
DEFINE VAR user_lang as char.
13
© 2008 Progress Software Corporation
User Context Management
N-Tier
Client
User
Input
Authentication
Request
Application Server
Authentication
Process
User Context
Object
Service
Request
User Accts
User
Context
Business
Logic
Audit Log
14
© 2008 Progress Software Corporation
Application State Management
Client/Server
Client
DEF VAR tot as dec init 0.
DEF QUERY qInv
FOR Inventory.
OPEN QUERY qInv
FOR EACH Inventory.
GET FIRST qInv.
DO WHILE AVAILABLE(qInv):
tot = tot + qInv.amount.
GET NEXT qInv.
END.
15
Inventory
Data
© 2008 Progress Software Corporation
Application State Management
N-Tier
Client
Application Server
Define QUERY qInv
For Inventory.
tot = 0.
RUN initQry() on hAS.
Procedure initQry()
Repeat while more:
RUN getAmt() on hAS.
Procedure getAmt()
Inventory
Data
tot = tot + amt.
End.
16
© 2008 Progress Software Corporation
Performance and Scalability
Client/Server
Client
User
Business
Logic
Data
User
User
User
17
© 2008 Progress Software Corporation
Performance and Scalability
N-Tier
Client
Application Server
Client
Client
Application
Resources
Data
Client
Client
Client
18
© 2008 Progress Software Corporation
Agenda
 AppServer Fundamentals
 Distributed Computing Design Considerations
 AppServer Operating Modes
•
•
•
•
State-reset
State-aware
Stateless
State-free
 Case Studies
19
© 2008 Progress Software Corporation
State-Reset/State-aware Operating Modes
Connection Process
Client1
Broker
Client2
NameServer
Agent
Client3
Client4
20
Agent
ABL
Data
Agent
X
AppServer
© 2008 Progress Software Corporation
State-Reset/State-aware Operating Modes
Inside the AppServer Agent
Client Connect
Request
Begin Request
Client bound to Agent for
CONNECTION Context
Session
Connect Procedure
Agent Startup
Connection
Startup Procedure
End Request
Disconnect Procedure
Shutdown Procedure
21
Client Disconnect
Agent Shutdown
© 2008 Progress Software Corporation
Stateless Operating Mode
Connection Process
Broker
Client2
NameServer
Client1
ABL
Data
Client3
Agents
Client4
22
AppServer
© 2008 Progress Software Corporation
Stateless Operating Mode
Inside the AppServer Agent
Client bound to Agent
for REQUEST Context
Deactivate Procedure
Disconnect Procedure
Shutdown Procedure
23
Begin Request
Session
Activate Procedure
Client Connect
Connection
Connect Procedure
Agent Startup
Request
Startup Procedure
SERVER-CONNECTION-ID
SERVER-CONNECTION-CONTEXT
End Request
Client Disconnect
Agent Shutdown
© 2008 Progress Software Corporation
State-Free Operating Mode
Connection Process
AppServer1
Client
1
NameServer
App1
AppServer2
App1
Data
AppServer3
App1
24
© 2008 Progress Software Corporation
State-free Operating Mode
Inside the AppServer Agent
Startup Procedure
Agent Startup
Client bound to Agent
for REQUEST Context
Deactivate Procedure
Session
Begin Request
Request
Activate Procedure
Connection
Client Connect
End Request
Client Disconnect
Shutdown Procedure
25
Agent Shutdown
© 2008 Progress Software Corporation
Agenda




AppServer Fundamentals
Distributed Computing Design Considerations
AppServer Operating Modes
Case Studies
•
•
•
•
26
Authentication and Authorization
User Context Management
Application State Management
Performance and Scalability
© 2008 Progress Software Corporation
Authentication and Authorization
State-reset/State-aware
Client
User
Input
AppServer
CONNECT
Request
CONNECT
Procedure
Authentication
Request
Login
Authentication
Context
Process
Object
Login Context
Object
User
Input
27
Service
Request
User Accts
Audit Log
Business
Logic
© 2008 Progress Software Corporation
Authentication and Authorization
Stateless
Client
User
Input
Authentication
Request
SERVER-CONNECTION-ID
User
Input
Service
Request
AppServer
Authentication
Process
Login Context
Object
User Accts
User
Context
Business
Logic
Audit Log
28
© 2008 Progress Software Corporation
Authentication and Authorization
State-free
Client
User
Input
Authentication
Request
AppServer
Authentication
Process
Login Context
Object
User
Input
Service
Request
SERVER-CONNECTION-ID is
NOT available
29
User Accts
User
Context
Business
Logic
Audit Log
© 2008 Progress Software Corporation
User Context Management
State-reset/State-aware
Client
User
Input
Authentication
Request
Application Server
Authentication
Process
User Accts
DEF VAR user_name ...
DEF VAR user_lang ...
User
Input
Service
Request
Business
Logic
Set Session User-Id
Audit
Once
atLog
Login
30
© 2008 Progress Software Corporation
User Context Management
Stateless
Client
User
Input
Authentication
Request
SERVER-CONNECTION-ID
User
Input
Service
Request
AppServer
User Accts
Authentication
Process
User Context
Object
User
Context
Business
Logic
Set Session User-Id
Log
prior Audit
to each
request
31
© 2008 Progress Software Corporation
User Context Management
State-free
Client
User
Input
Authentication
Request
AppServer
User Accts
Authentication
Process
User Context
Object
User
Input
Service
Request
SERVER-CONNECTION-ID is
NOT available
32
User
Context
Business
Logic
Set Session User-Id
Log
prior Audit
to each
request
© 2008 Progress Software Corporation
Application State Management
State-reset/State-aware
Client
User
Input
Authentication
Request
Application Server
Authentication
Process
User Accts
DEF VAR tot ...
DEF QUERY qInv ...
User
Input
Service
Request
Business
Logic
Audit Log
33
© 2008 Progress Software Corporation
Application State Management
Stateless
Client
User
Input
Authentication
Request
SERVER-CONNECTION-ID
User
Input
Service
Request
AppServer
Authentication
Process
Application
Context
User Accts
SERVER
CONNECTION
Application
CONTEXT
Context
Business
Logic
Audit Log
34
© 2008 Progress Software Corporation
Application State Management
State-free
Client
User
Input
Authentication
Request
AppServer
Authentication
Process
Application
Context
User
Input
Service
Request
SERVER-CONNECTION-ID is
NOT available
35
Business
Logic
User Accts
Application
Context
SERVER
CONNECTION
CONTEXT is
NOT available
Audit Log
© 2008 Progress Software Corporation
Performance and Scalability
State-aware/State-reset
Agent1
Client2
Agent2
Client3
Broker
Client1
ABL
Data
Agent3
Agentn
Clientn
AppServer
36
© 2008 Progress Software Corporation
Performance and Scalability
Stateless
Client1
Agent1
Client2
Client3
Broker
Agent2
ABL
Data
Agent3
Client4
Agentm
Clientn
37
AppServer
© 2008 Progress Software Corporation
Performance and Scalability
State-free
AppServer1
Clientn
NameServer
App1
AppServer2
App1
Data
AppServerm
App1
38
© 2008 Progress Software Corporation
Getting Started
Consider State-reset or State-aware mode if your application…
 Scalability is not a requirement
• Small number of users
• Application is somewhat static
 Requires complex application state
• Requires large critical sections
• Makes extensive use of remote persistent
procedures
 Requires fastest possible response time
39
© 2008 Progress Software Corporation
Getting Started
Consider Stateless mode if your application…




Need to support large number of users
Manages small amounts of application state
Critical sections are small
Makes minimal use of remote persistent
procedures
 Makes short-lived remote procedure calls
40
© 2008 Progress Software Corporation
Getting Started
Consider State-free mode if your application…
 Requires maximum scalability
 Can be distributed across multiple systems
• Any request can execute on different systems
 Can make use of concurrent processing of
remote procedures
41
© 2008 Progress Software Corporation
Getting Started
Consider multiple operating modes
 Organize your application into multiple
services
 Different services can use different operating
modes
42
© 2008 Progress Software Corporation
In Summary
 Different operating modes are
available to suit different
application requirements
 Choice of modes often requires
tradeoff between scalability and
complexity
 Choose the mode or modes
most appropriate for both short
and long term goals
43
© 2008 Progress Software Corporation
For More Information, go to…
 PSDN
• Designing Common Business Services for the AppServer,
by Anthony Swindells
• Understanding the AppServer, Inside-Out
• A Stateful Application in a Stateless World
 Documentation:
• OpenEdge® Application Server: Developing AppServer
Applications
• OpenEdge Application Server: Administration
• OpenEdge Development: ABL Handbook, by John Sadd
44
© 2008 Progress Software Corporation
?
Questions
45
© 2008 Progress Software Corporation
Thank You
46
© 2008 Progress Software Corporation
47
© 2008 Progress Software Corporation