Ch. 12 security

29
Chapter 12 Security

Transcript of Ch. 12 security

Page 1: Ch. 12 security

Chapter 12Security

Page 2: Ch. 12 security

Βασική αναφοράΚάθε εφαρμογή του ΠΙ μπορεί να

• Αλωθεί

• Προστατευθεί σε μεγάλο βαθμό • Με αντίστοιχο κόστος

• Δεν υπάρχει λύση • Μόνον καλές πρακτικές

Page 3: Ch. 12 security

Τρόποι άλλωσης

• Τεχνικοί

• Ψυχολογικοί

Page 4: Ch. 12 security

The bad guys: Impersonators, Upgraders & Eavesdroppers

Can be basted with

• authentication, • are who you say you are?

• authorization, • what are you allowed to …?

• confidentiality, data integrity. • who sees or messes up with …?

Page 5: Ch. 12 security
Page 6: Ch. 12 security
Page 7: Ch. 12 security
Page 8: Ch. 12 security

Authentication

Page 9: Ch. 12 security

Authentication & Authorization in detail

Page 10: Ch. 12 security

Two (and a half) basic types

• Declarative

• Programmatic • Informative

Page 11: Ch. 12 security

Keep security out of the code

• Component-based

• Ever evolving

• Several levels

• …

Page 12: Ch. 12 security

Secure your code

• Declaratively in the DD • Interfacing between

• Servlet authors • App administrators • App deployers

Page 13: Ch. 12 security

Concentrate on Authentication

• Container-specific table containing • Usernames, passwords & roles

• LDAP

Page 14: Ch. 12 security

Realm: tomcat-users.xml

In the DD

Page 15: Ch. 12 security

Defines roles

Page 16: Ch. 12 security

Define resource/method

constraints

Page 17: Ch. 12 security

You really

need to be

careful

Page 18: Ch. 12 security

Big picture

Page 19: Ch. 12 security

Multiple <security-

constraint> elements

Page 20: Ch. 12 security

Truth table (Union)

Page 21: Ch. 12 security

Programmatic Security

Page 22: Ch. 12 security

Programmatic Security

Page 23: Ch. 12 security

J2EE Container Authentication types

• Basic

• Digest (encoded)

• Client-cert (mainly for B2B)

• Form (custom but no encrypted)

Page 24: Ch. 12 security
Page 25: Ch. 12 security
Page 26: Ch. 12 security

Authentication Summary

Page 27: Ch. 12 security

Data Protection

Page 28: Ch. 12 security

Protect Requested

Data

• Tell browser to use HTTPs

Page 29: Ch. 12 security