52
Cache Security 1 Katherine Reid, Mike Moulckers

Cache Security- The Basics

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Cache Security- The Basics

Cache Security 1

Katherine Reid, Mike Moulckers

Page 2: Cache Security- The Basics

Goals

• Understand Cache security model

• How to apply it to a simple web application

Page 3: Cache Security- The Basics

Academy Agenda

• Introduction

• Authentication

• Authorization

• Auditing

Page 4: Cache Security- The Basics

Configuration Details

• Username and Password:

– User: Admin

– Password: academy

Page 5: Cache Security- The Basics

Introduction

Page 6: Cache Security- The Basics

Security Components

1. Authentication

2. Authorization

3. Auditing

Page 7: Cache Security- The Basics

Security Configuration At Install

• Determines the initial configuration settings for Caché Services and Security

• Changes:

– System-wide settings

– User accounts

– Service properties

Minimal

Normal

Locked Down

Page 8: Cache Security- The Basics

System Management Portal

• Portal redesigned for 2011.1– Granular security

Page 9: Cache Security- The Basics

System wide settings

Page 10: Cache Security- The Basics

Exercise 1: Password Validation

• Test password validation and explore examples of what it can be used for.

Page 11: Cache Security- The Basics

Demo: ZEN Application

Page 12: Cache Security- The Basics

Exercise 2: Creating a User

• Create a user to use in the Inventory application.

Page 13: Cache Security- The Basics

User Profile

Page 14: Cache Security- The Basics

Authentication

Page 15: Cache Security- The Basics

Authentication

What is authentication?

Page 16: Cache Security- The Basics

Authentication Methods

• Unauthenticated

• Password

• Operating System

• LDAP

• Delegated Authentication

• Kerberos

Page 17: Cache Security- The Basics

Unauthenticated

• No username or password required.

• Always logged in as ‘UnknownUser’.

Page 18: Cache Security- The Basics

Cache Password Authentication

• Simple

• Easy to set up for a single instance

• User data stored in local instance

Page 19: Cache Security- The Basics

OS Authentication

• User identified to Caché by OS user identity

• User authenticates to the OS using the native mechanism

• Only available for server-side processes

– Terminal

Page 20: Cache Security- The Basics

LDAP

• Already in use at many sites.

• Allows centralized user storage.

Page 21: Cache Security- The Basics

Delegated

• User-defined authentication mechanism

• Re-use existing custom/legacy authentication code for new, modern applications.

• Code is in the ZAUTHENTICATE routine.

• The authentication code can be any user-defined:

• Caché ObjectScript

• Embedded SQL

• Class Method(s)

• $ZF callout code.

Page 22: Cache Security- The Basics

Kerberos

• Most secure authentication type.

• Used by Windows.

• Requires a Kerberos Domain Controller

– eg, Windows Domain Controller

Page 23: Cache Security- The Basics

Services

Page 24: Cache Security- The Basics

Service Detail

Page 25: Cache Security- The Basics

Authentication Options

Page 26: Cache Security- The Basics

Exercise 3: Authentication Types

• Change the authentication types allowed in the Inventory application to make users have to provide a username and password to log in.

Page 27: Cache Security- The Basics

Authorization

Page 28: Cache Security- The Basics

Authorization

What is authorization?

Page 29: Cache Security- The Basics

Terminology

• Asset: something that is protected:

– A Caché database

– Caché SQL connection

– Ability to perform a backup

Page 30: Cache Security- The Basics

Terminology

• Resource: something which protects an asset:

– Database Resource (i.e. %DB_Samples)

– Administrative Resource (i.e. %Admin_Manage)

– Development Resource (i.e. %Development)

– Service Resource (i.e. %Service_CSP)

– User Defined

Page 31: Cache Security- The Basics

Terminology

• Permission: allows you to perform an action

– Read (R): View (but not change) the contents of a resource

– Write (W): View or change the contents of a resource

– Use (U): Use a resource, such as an Application or Service

Page 32: Cache Security- The Basics

Terminology

• Privilege: grants permission to do something with a resourceprotecting one or more assets

– A privilege is written as a resource name followed by a permissionseparated by a colon:

Example: %DB_SAMPLES:Read

Page 33: Cache Security- The Basics

More about Privileges…

• Privileges can be made Public.

• Effectively, this is equivalent to all users holding that privilege

– Example: if the %Service_CacheDirect:Use privilege is Public, then

any user can connect to Caché using the Caché Direct technology

• Caché provides a function to check on privileges held by the current process:

– $SYSTEM.Security.Check(Resource,Permission)

Page 34: Cache Security- The Basics

Exercise 4: Public Resource

• We've decided that all authenticated users of our system should be allowed to run this application. We will make the database which holds the code publicly readable so that everyone can run it.

Page 35: Cache Security- The Basics

Roles

• Role: a named collection of privileges

– Multiple users typically need the same set of privileges.

– Sets of privileges can be defined once and shared.

– Privileges are only assigned to roles.

– Privileges are not assigned directly to users.

– A user can have more than one role.

Page 36: Cache Security- The Basics

Exercise 5: Roles and Resources

• We will add code to our Inventory application to individually control access to the functions in the application, and create roles and resources to allow users to access them

Page 37: Cache Security- The Basics

Three ways to get Roles...

• At user login

• Granted by an application

• Code stored in CACHESYS can set $Roles

Page 38: Cache Security- The Basics

Application Roles

• Everyone running the application gets application roles

Page 39: Cache Security- The Basics

Exercise 6: Application Roles

• Instead of having database access in the roles, we will have the application give this to users. The application will control access to the database.

Page 40: Cache Security- The Basics

Matching Roles

• Only the users who have the first role get the second role.

Page 41: Cache Security- The Basics

Exercise 7: Matching Roles

• We may not want all users to be able to access all the data on entering the application. Demonstrate how matching roles can be assigned to selected users.

Page 42: Cache Security- The Basics

Granular Security in the SMP

Page 43: Cache Security- The Basics

Granular Security in the SMP

Page 44: Cache Security- The Basics

Exercise 8: Granular Security in the SMP

• Demonstrate the new granular security in the System Management Portal

Page 45: Cache Security- The Basics

Auditing

Page 46: Cache Security- The Basics

Why Audit?

• Allows monitoring of system

• Deterrent

Page 47: Cache Security- The Basics

What events are audited?

• System defined events

• User defined events

Page 48: Cache Security- The Basics

Where is it kept?

• Audit data is stored in a database called CACHEAUDIT.

• Protected by the %DB_CACHEAUDIT resource.

– No user should have access to this resource directly.

• View via SMP, terminal utilities, SQL, APIs, etc.

Page 49: Cache Security- The Basics

Exercise 9: Viewing the Audit Log

• We demonstrate using the audit log to see what has happened on the system.

Page 50: Cache Security- The Basics

What’s in an audit record?

Page 51: Cache Security- The Basics

Join the Global Summit Community

We’ve established an online community where you can:

• talk about the Global Summit

• get helpful product information

• share your thoughts about sessions

• ask questions of presenters

• assemble a group to meet for dinner or social events, etc.

community.intersystems.com

Page 52: Cache Security- The Basics

Questions?