Advanced Authentication in DotNetNukeblogs.harvard.edu/brandonhaynes/files/2009/06/... ·...

Post on 31-May-2020

1 views 0 download

Transcript of Advanced Authentication in DotNetNukeblogs.harvard.edu/brandonhaynes/files/2009/06/... ·...

Advanced Authorization in DotNetNuke

Brandon Haynes

1

Hi, I’m Brandon.

2

Research Interests

3

Professional Interests

4

DotNetNuke Activities

• Core Team Member (Security)

• Framework and Module Security Guidance

• Current Research

– Multi-Factor Authentication

– Model Adaptation

– Cloud Integration

5

Our agenda.

1. What is this all about?

2. How does this relate to DotNetNuke?

3. Show me something concrete, already.

6

You promised me authorization. Doesn’t that mean passwords and

fingerprints and stuff?

Act 1

7

8

PrincipalSomething that can be authenticated.You. A machine. A service.

IdentifierUnique value used to reference a principal.

Thus, Authentication(Matching principals to factors)

9

Knowledge PossessionInherence

We’re here to talk about what happens after authentication:

Authorization.

(Shameless Plug: If you’re interested in this stuff, be sure to attend Open Force 2009, where I will be talking about module security in much greater detail!) 10

Authorization

• I know who you are.

• But what can you do?

– Or access?

• Involves two things:

– Policy definition (who can do what)

– Policy enforcement (no, you can’t do that)

11

Act 2What does this have to do with

DotNetNuke, anyway?

12

Pre-5.1 Authorization: Architecture

13

Pre-5.1 Authorization: Classes

Boring CRUD

Operations

Sexy,Interesting

Method

14

Pre-5.1 Authorization: Methods

Public Shared Function HasModulePermission _

(ByVal permissions As ModulePermissionCollection, _

ByVal key As String) As Boolean

Return PortalSecurity.IsInRoles(permissions.ToString(key))

End Function

15

Okay, so what’s new?

16

5.1 CE Authorization Provider

17

5.1 CE CorePermissionProviderCategory Overridable Methods

Module Permissions

CanAdminModule CanImportModule

CanDeleteModule CanManageModule

CanEditModuleContent CanViewModule

CanExportModule HasModulePermission

GetModulePermissions

DeleteModulePermissionsByUser

Page Permissions

CanAddContentToPage CanExportPage

CanAddPage CanImportPage

CanAdminPage CanManagePage

CanCopyPage CanNavigateToPage

CanDeletePage CanViewPage

DeleteTabPermissionsByUser

Folder Permissions

CanAdminFolder CanDeleteFolder

CanAddFolder CanManageFolder

CanCopyFolder CanViewFolder

HasFolderPermission SaveFolderPermissions

DeleteFolderPermissionsByUser

GetFolderPermissionsCollectionByFolder

18

Attack of the giant

table!

5.1 CE CorePermissionProviderCategory Overridable Methods

Module Permissions

CanViewModule

CanDeleteModule

CanAdminModule…

Page Permissions

CanViewPage

CanAddPage

CanDeletePage…

Folder Permissions

CanViewFolder

CanAddFolder

CanDeleteFolder… 19

If TabPermissionController.CanAddPage Then

Dim controller As New TabController

Controller.AddTab(…)

End If

5.1 Authorization: The Big Picture

20

1

2

3

4

Act 3Show me how to use it.

21

Hello World Demo

– MagicUsernamePermissionProvider

– Gives Brandon page admin rights across all portals

– About the simplest PermissionProvider possible

22

Hello World: Configuration

23

MagicUsernamePermissionProvider Implementation

24

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

Now for some fun.

25

Amazon Simple Storage Service (S3)

Amazon S3 is storage for the Internet. It isdesigned to make web-scale computing easierfor developers.

”26

Amazon S3 is intentionally built with a minimal feature set.

Amazon Simple Storage Service (S3)

• Accounts

• Buckets

• Abstract objects

• Simple Permissions

• Very simple web service API– Access via shared secret

“ ”

27

DotNetNuke S3 Integration

• Data Provider

• Authorization Provider

28

S3 Provider Architecture: Data

SQL Server

…29

S3 Provider Implementation: Data

* Code simplified for reading30

S3 Architecture: Authorization

31

S3 Implementation: Authorization

32

1

2

3

4

5

6

7

8

9

10

11

12

13

14

DotNetNuke and S3: Discussion

• File-based permissions

• CRUD

• Shared secrets

• Performance

• Available at brandonhaynes.org.

33

Points to Remember

• Authorization is a first-class extension point as of version 5.1.

• It is extended via the provider pattern, just like any other DotNetNuke provider would be

• The provider deals with page-, module-, and folder-related authorizations.

• Custom authorization allows for framework extension to interesting and novel scenarios.

34

Thanks to:Will Strohl, Darrell Hardy, Ryan

Morgan, Stan Schultes and all the DoDNN Organizers.

All of the DotNetNuke Core Team, Corporation, and Community.

And all the volunteers, sponsors, and participants that made this event

possible. 35

Insert questions here.

36

More questions? Contact me via brandonhaynes.org.