SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Introduction 
Authentication 
Authorization 
Accounting 
End 
The Three Musketeers 
(Authentication, Authorization, & Accounting) 
Sarah Conway 
credativ USA 
info@credativ.com 
September 18, 2014 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
Agenda 
AAA Model 
Agenda 
Introduction 
AAA Model 
Authentication 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
Authorization 
pg hba.conf 
Access Privileges 
Auditing 
Inspecting Privileges 
Logging 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
Agenda 
AAA Model 
AAA Model 
AAA Model - Framework that can identify users, authorize 
what they can access, and create audit trails 
Authentication - Server veri
es the user is who they claim to be 
Authorization - Determines what authenticated user can access 
and modify 
Accounting - Records what user accesses, what actions are 
performed, and date/time of access 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
postgresql.conf overview 
Located by default on Debian in 
/etc/postgresql/version/main/ 
or whatever directory $PGDATA is for you 
Locate in postgres session as superuser 
SHOW data directory; 
SHOW con
g
le; 
Comment = # 
www.postgresql.org/docs/9.3/static/ 
config-setting.html 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
postgresql.conf Security and Authentication 
#authentication_timeout = 1min 
ssl = true 
#ssl_ciphers = 'DEFAULT:!LOW:!EXP:!MD5:@STRENGTH' 
#ssl_renegotiation_limit = 512MB 
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' 
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' 
#ssl_ca_file = '' 
#ssl_crl_file = '' 
#password_encryption = on 
#db_user_namespace = off 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
postgresql.conf Security and Authentication 
# Kerberos and GSSAPI 
#krb_server_keyfile = '' 
#krb_srvname = 'postgres' 
#krb_caseins_users = off 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
pg settings 
Alternate way to view postgres server settings 
Primarily same options as are available in postgresql.conf 
Context column 
internal - All internal server values, cannot be changed directly 
postmaster - If changed, requires restart 
sighup - If changed, requires reload 
superuser - Can only be changed by superusers in a session 
user - Can be changed by any user in a session 
www.postgresql.org/docs/9.3/static/ 
view-pg-settings.html 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
pg settings 
test=# select * from pg_settings where name in ('authentication_timeout'); 
-[ RECORD 1 ]---------------------------------------------------------------- 
name | authentication_timeout 
setting | 60 
unit | s 
category | Connections and Authentication / Security and Authentication 
short_desc | Sets the maximum allowed time to complete client authentication. 
extra_desc | 
context | sighup 
vartype | integer 
source | default 
min_val | 1 
max_val | 600 
enumvals | 
boot_val | 60 
reset_val | 60 
sourcefile | 
sourceline | 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
pg settings 
test=# select name, setting, context, source from pg_settings where name in 
('authentication_timeout'); 
name | setting | context | source 
------------------------+---------+---------+--------- 
authentication_timeout | 60 | sighup | default 
(1 row) 
test =# x 
Expanded display now on. 
test=# select name, setting, context, source from pg_settings where name in 
('authentication_timeout'); 
-[ RECORD 1 ]------------------- 
name | authentication_timeout 
setting | 60 
context | sighup 
source | default 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
CREATE ROLE with LOGIN 
Same as CREATE USER 
Creates username/password pair 
Authentication-based parameters 
username, password, password expiration/encryption settings 
Create user with password valid until October 10th, 2014: 
CREATE ROLE sauron LOGIN PASSWORD 'nazgul' VALID UNTIL '2014-10-01'; 
Drop user: 
DROP ROLE sauron; 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
pg hba.conf overview 
pg hba.conf - con
guration
le that controls client 
authentication/authorization 
Located by default on Debian in 
/etc/postgresql/version/main/ or wherever $PGDATA is 
Ask postgres in superuser session 'SHOW hba
le;' to locate 
Speci
es connection type, client IP address range, database 
name, user name, and authentication method used for 
matching connections 
www.postgresql.org/docs/9.3/static/ 
auth-pg-hba-conf.html 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
auth-method parameters 
auth-method - Speci
es authentication method for use when 
match is found 
trust - Allows full access to user; can login as any existing user 
reject - Rejects all access to speci
c connections/hosts 
md5 - Requires user to provide password 
Password is md5-salted-and-hashed by client 
password - Requires user to provide password 
Password stored/sent in clear-text 
gss - Uses GSSAPI 
TCP/IP connections only 
sspi - Uses SSPI 
Windows OS only 
krb5 - Uses Kerberos V5 
TCP/IP connections only 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
auth-method parameters, cont. 
ident - Contacts ident server on client, checks if client 
username matches database user name 
TCP/IP connections only 
peer - Checks for match between client username and 
database user name 
Local connections only 
ldap - Uses LDAP server 
radius - Uses RADIUS server 
cert - Uses SSL client certi
cates 
pam - Uses Pluggable Authentication Modules (PAM) service 
auth-options - Fields of the form name=value specify options 
for selected authentication method 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
SSL - Overview 
Normally used as a standard security technology for 
encrypting network connections 
Also used for authenticating users with certi
cates 
Certi
cate issued by CA who authenticates user using a 
cryptographic public key 
Veri
er cannot impersonate user 
Separates user from authentication method; not vulnerable to 
phishing 
Two-factor authentication recommended 
www.postgresql.org/docs/9.3/static/ssl-tcp.html 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
SSL 
Requires setting 'ssl' to 'on' in postgresql.conf 
Requires installation of SSL certi
cates on client/server 
Files containing server certi
cate and private key must exist 
Named server.crt and server.key by default 
Located in server's data directory 
Can rename or relocate by modifying ssl cert
le and 
ssl key
le 
Sarah Conway Postgres Open
Introduction 
Authentication 
Authorization 
Accounting 
End 
postgresql.conf 
User Accounts 
Authentication Methods 
SSL 
SSL - Server File Usage 
The following
les (named by default) are relevant to SSL 
setup on server - 
ssl cert
le - $PGDATA/server.crt 
Contents - server certi
cate 
Sent to client to identify server 
ssl key
le - $PGDATA/server.key 
Contents - server private key 
Proves server certi

Weitere ähnliche Inhalte

Was ist angesagt?

Radius vs. Tacacs+
Radius vs. Tacacs+Radius vs. Tacacs+
Radius vs. Tacacs+Netwax Lab
 
Radiojungle AAA RADIUS introduction
Radiojungle AAA RADIUS introductionRadiojungle AAA RADIUS introduction
Radiojungle AAA RADIUS introductionsmoscato
 
TACACS Protocol
TACACS ProtocolTACACS Protocol
TACACS ProtocolNetwax Lab
 
Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...saidzaghloul
 
radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)rinnocente
 
Radius Protocol
Radius ProtocolRadius Protocol
Radius ProtocolNetwax Lab
 
Tacacs
TacacsTacacs
Tacacs1 2d
 
Authentication, authorization, accounting(aaa) slides
Authentication, authorization, accounting(aaa) slidesAuthentication, authorization, accounting(aaa) slides
Authentication, authorization, accounting(aaa) slidesrahul kundu
 
Cisco acs configuration guide
Cisco acs configuration guideCisco acs configuration guide
Cisco acs configuration guideRichardsCCNA
 
Kerberos Protocol
Kerberos ProtocolKerberos Protocol
Kerberos ProtocolNetwax Lab
 
WiFi Hotspot Password
WiFi Hotspot PasswordWiFi Hotspot Password
WiFi Hotspot PasswordMaryam Namira
 
WSO2Con 2011: Introduction to Stratos
WSO2Con 2011: Introduction to StratosWSO2Con 2011: Introduction to Stratos
WSO2Con 2011: Introduction to StratosAfkham Azeez
 
Mutual Authentication For Wireless Communication
Mutual Authentication For Wireless CommunicationMutual Authentication For Wireless Communication
Mutual Authentication For Wireless Communicationmanish kumar
 
Implementation of ssl injava
Implementation of ssl injavaImplementation of ssl injava
Implementation of ssl injavatanujagrawal
 
Cryptzone: The Software-Defined Perimeter
Cryptzone: The Software-Defined PerimeterCryptzone: The Software-Defined Perimeter
Cryptzone: The Software-Defined PerimeterCryptzone
 

Was ist angesagt? (20)

Radius vs. Tacacs+
Radius vs. Tacacs+Radius vs. Tacacs+
Radius vs. Tacacs+
 
AAA Implementation
AAA ImplementationAAA Implementation
AAA Implementation
 
Radiojungle AAA RADIUS introduction
Radiojungle AAA RADIUS introductionRadiojungle AAA RADIUS introduction
Radiojungle AAA RADIUS introduction
 
TACACS Protocol
TACACS ProtocolTACACS Protocol
TACACS Protocol
 
Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...
 
radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)
 
Radius Protocol
Radius ProtocolRadius Protocol
Radius Protocol
 
Tacacs
TacacsTacacs
Tacacs
 
Authentication, authorization, accounting(aaa) slides
Authentication, authorization, accounting(aaa) slidesAuthentication, authorization, accounting(aaa) slides
Authentication, authorization, accounting(aaa) slides
 
Cisco acs configuration guide
Cisco acs configuration guideCisco acs configuration guide
Cisco acs configuration guide
 
Kerberos Protocol
Kerberos ProtocolKerberos Protocol
Kerberos Protocol
 
WiFi Hotspot Password
WiFi Hotspot PasswordWiFi Hotspot Password
WiFi Hotspot Password
 
WSO2Con 2011: Introduction to Stratos
WSO2Con 2011: Introduction to StratosWSO2Con 2011: Introduction to Stratos
WSO2Con 2011: Introduction to Stratos
 
TLS and Certificates
TLS and CertificatesTLS and Certificates
TLS and Certificates
 
EAP-TLS
EAP-TLSEAP-TLS
EAP-TLS
 
The last picks
The last picksThe last picks
The last picks
 
Mutual Authentication For Wireless Communication
Mutual Authentication For Wireless CommunicationMutual Authentication For Wireless Communication
Mutual Authentication For Wireless Communication
 
Implementation of ssl injava
Implementation of ssl injavaImplementation of ssl injava
Implementation of ssl injava
 
EMEA Airheads- Getting Started with the ClearPass REST API – CPPM
EMEA Airheads-  Getting Started with the ClearPass REST API – CPPMEMEA Airheads-  Getting Started with the ClearPass REST API – CPPM
EMEA Airheads- Getting Started with the ClearPass REST API – CPPM
 
Cryptzone: The Software-Defined Perimeter
Cryptzone: The Software-Defined PerimeterCryptzone: The Software-Defined Perimeter
Cryptzone: The Software-Defined Perimeter
 

Andere mochten auch

Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior
 
Authentication, authorization, and accounting Nawaf-Sultan
Authentication, authorization, and accounting Nawaf-SultanAuthentication, authorization, and accounting Nawaf-Sultan
Authentication, authorization, and accounting Nawaf-SultanNawaf_alghamdi
 
Web Application Security 101 - 14 Data Validation
Web Application Security 101 - 14 Data ValidationWeb Application Security 101 - 14 Data Validation
Web Application Security 101 - 14 Data ValidationWebsecurify
 
Keamanan Jaringan - Pertemuan 4
Keamanan Jaringan - Pertemuan 4Keamanan Jaringan - Pertemuan 4
Keamanan Jaringan - Pertemuan 4Abrianto Nugraha
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetShivanand Arur
 
CCNA Security 06- AAA
CCNA Security 06- AAACCNA Security 06- AAA
CCNA Security 06- AAAAhmed Habib
 

Andere mochten auch (9)

Crypto academy
Crypto academyCrypto academy
Crypto academy
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
A A A
A A AA A A
A A A
 
Authentication, authorization, and accounting Nawaf-Sultan
Authentication, authorization, and accounting Nawaf-SultanAuthentication, authorization, and accounting Nawaf-Sultan
Authentication, authorization, and accounting Nawaf-Sultan
 
Authentication Concepts
Authentication ConceptsAuthentication Concepts
Authentication Concepts
 
Web Application Security 101 - 14 Data Validation
Web Application Security 101 - 14 Data ValidationWeb Application Security 101 - 14 Data Validation
Web Application Security 101 - 14 Data Validation
 
Keamanan Jaringan - Pertemuan 4
Keamanan Jaringan - Pertemuan 4Keamanan Jaringan - Pertemuan 4
Keamanan Jaringan - Pertemuan 4
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
 
CCNA Security 06- AAA
CCNA Security 06- AAACCNA Security 06- AAA
CCNA Security 06- AAA
 

Ähnlich wie The Three Musketeers (Authentication, Authorization, Accounting)

Introduction to MariaDb
Introduction to MariaDbIntroduction to MariaDb
Introduction to MariaDbBehzadDara
 
010 sa302 aaa+ldap
010 sa302 aaa+ldap010 sa302 aaa+ldap
010 sa302 aaa+ldapBabaa Naya
 
010 sa302 aaa+ldap
010 sa302 aaa+ldap010 sa302 aaa+ldap
010 sa302 aaa+ldapBabaa Naya
 
Code your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnCode your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnDan Rinzel
 
RADIUS- Packet Example/Vendors
RADIUS- Packet Example/Vendors RADIUS- Packet Example/Vendors
RADIUS- Packet Example/Vendors zarigatongy
 
3429 How to transform your messaging environment to a secure messaging envi...
3429   How to transform your messaging environment to a secure messaging envi...3429   How to transform your messaging environment to a secure messaging envi...
3429 How to transform your messaging environment to a secure messaging envi...Robert Parker
 
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3Adel Karimi
 
IBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-DiveIBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-DiveMorag Hughson
 
Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Kaan Aslandağ
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka confluent
 
Kafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right WayKafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right WaySaylor Twift
 
IBM MQ Security Deep Dive
IBM MQ Security Deep DiveIBM MQ Security Deep Dive
IBM MQ Security Deep DiveIBM Systems UKI
 
Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)ikram_ahamed
 
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXDockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXKevin Jones
 
WSO2 Italia Open Break Session #2 - Microgateway
WSO2 Italia Open Break Session #2 - MicrogatewayWSO2 Italia Open Break Session #2 - Microgateway
WSO2 Italia Open Break Session #2 - MicrogatewayProfesia Srl, Lynx Group
 
Design and Analyze Secure Networked Systems - 3
Design and Analyze Secure Networked Systems - 3Design and Analyze Secure Networked Systems - 3
Design and Analyze Secure Networked Systems - 3Don Kim
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile ManagementKate Semizhon
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggStreamNative
 
M365 meetup hybrid identity well protected
M365 meetup hybrid identity well protectedM365 meetup hybrid identity well protected
M365 meetup hybrid identity well protectedKonrad Sagala
 

Ähnlich wie The Three Musketeers (Authentication, Authorization, Accounting) (20)

Introduction to MariaDb
Introduction to MariaDbIntroduction to MariaDb
Introduction to MariaDb
 
010 sa302 aaa+ldap
010 sa302 aaa+ldap010 sa302 aaa+ldap
010 sa302 aaa+ldap
 
010 sa302 aaa+ldap
010 sa302 aaa+ldap010 sa302 aaa+ldap
010 sa302 aaa+ldap
 
Code your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnCode your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard Learn
 
RADIUS- Packet Example/Vendors
RADIUS- Packet Example/Vendors RADIUS- Packet Example/Vendors
RADIUS- Packet Example/Vendors
 
3429 How to transform your messaging environment to a secure messaging envi...
3429   How to transform your messaging environment to a secure messaging envi...3429   How to transform your messaging environment to a secure messaging envi...
3429 How to transform your messaging environment to a secure messaging envi...
 
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3
honeyTLS - Profiling and Clustering Internet-wide SSL/TLS Scans with JA3
 
IBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-DiveIBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-Dive
 
Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka
 
Kafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right WayKafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right Way
 
IBM MQ Security Deep Dive
IBM MQ Security Deep DiveIBM MQ Security Deep Dive
IBM MQ Security Deep Dive
 
Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)Indianapolis mule soft_meetup_30_jan_2021 (1)
Indianapolis mule soft_meetup_30_jan_2021 (1)
 
O auth 2
O auth 2O auth 2
O auth 2
 
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXDockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
 
WSO2 Italia Open Break Session #2 - Microgateway
WSO2 Italia Open Break Session #2 - MicrogatewayWSO2 Italia Open Break Session #2 - Microgateway
WSO2 Italia Open Break Session #2 - Microgateway
 
Design and Analyze Secure Networked Systems - 3
Design and Analyze Secure Networked Systems - 3Design and Analyze Secure Networked Systems - 3
Design and Analyze Secure Networked Systems - 3
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile Management
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
 
M365 meetup hybrid identity well protected
M365 meetup hybrid identity well protectedM365 meetup hybrid identity well protected
M365 meetup hybrid identity well protected
 

Kürzlich hochgeladen

Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.pptamreenkhanum0307
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 

Kürzlich hochgeladen (20)

Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.ppt
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 

The Three Musketeers (Authentication, Authorization, Accounting)

  • 1. Introduction Authentication Authorization Accounting End The Three Musketeers (Authentication, Authorization, & Accounting) Sarah Conway credativ USA info@credativ.com September 18, 2014 Sarah Conway Postgres Open
  • 2. Introduction Authentication Authorization Accounting End Agenda AAA Model Agenda Introduction AAA Model Authentication postgresql.conf User Accounts Authentication Methods SSL Authorization pg hba.conf Access Privileges Auditing Inspecting Privileges Logging Sarah Conway Postgres Open
  • 3. Introduction Authentication Authorization Accounting End Agenda AAA Model AAA Model AAA Model - Framework that can identify users, authorize what they can access, and create audit trails Authentication - Server veri
  • 4. es the user is who they claim to be Authorization - Determines what authenticated user can access and modify Accounting - Records what user accesses, what actions are performed, and date/time of access Sarah Conway Postgres Open
  • 5. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL postgresql.conf overview Located by default on Debian in /etc/postgresql/version/main/ or whatever directory $PGDATA is for you Locate in postgres session as superuser SHOW data directory; SHOW con
  • 6. g
  • 7. le; Comment = # www.postgresql.org/docs/9.3/static/ config-setting.html Sarah Conway Postgres Open
  • 8. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL postgresql.conf Security and Authentication #authentication_timeout = 1min ssl = true #ssl_ciphers = 'DEFAULT:!LOW:!EXP:!MD5:@STRENGTH' #ssl_renegotiation_limit = 512MB ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' #ssl_ca_file = '' #ssl_crl_file = '' #password_encryption = on #db_user_namespace = off Sarah Conway Postgres Open
  • 9. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL postgresql.conf Security and Authentication # Kerberos and GSSAPI #krb_server_keyfile = '' #krb_srvname = 'postgres' #krb_caseins_users = off Sarah Conway Postgres Open
  • 10. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL pg settings Alternate way to view postgres server settings Primarily same options as are available in postgresql.conf Context column internal - All internal server values, cannot be changed directly postmaster - If changed, requires restart sighup - If changed, requires reload superuser - Can only be changed by superusers in a session user - Can be changed by any user in a session www.postgresql.org/docs/9.3/static/ view-pg-settings.html Sarah Conway Postgres Open
  • 11. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL pg settings test=# select * from pg_settings where name in ('authentication_timeout'); -[ RECORD 1 ]---------------------------------------------------------------- name | authentication_timeout setting | 60 unit | s category | Connections and Authentication / Security and Authentication short_desc | Sets the maximum allowed time to complete client authentication. extra_desc | context | sighup vartype | integer source | default min_val | 1 max_val | 600 enumvals | boot_val | 60 reset_val | 60 sourcefile | sourceline | Sarah Conway Postgres Open
  • 12. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL pg settings test=# select name, setting, context, source from pg_settings where name in ('authentication_timeout'); name | setting | context | source ------------------------+---------+---------+--------- authentication_timeout | 60 | sighup | default (1 row) test =# x Expanded display now on. test=# select name, setting, context, source from pg_settings where name in ('authentication_timeout'); -[ RECORD 1 ]------------------- name | authentication_timeout setting | 60 context | sighup source | default Sarah Conway Postgres Open
  • 13. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL CREATE ROLE with LOGIN Same as CREATE USER Creates username/password pair Authentication-based parameters username, password, password expiration/encryption settings Create user with password valid until October 10th, 2014: CREATE ROLE sauron LOGIN PASSWORD 'nazgul' VALID UNTIL '2014-10-01'; Drop user: DROP ROLE sauron; Sarah Conway Postgres Open
  • 14. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL pg hba.conf overview pg hba.conf - con
  • 16. le that controls client authentication/authorization Located by default on Debian in /etc/postgresql/version/main/ or wherever $PGDATA is Ask postgres in superuser session 'SHOW hba
  • 17. le;' to locate Speci
  • 18. es connection type, client IP address range, database name, user name, and authentication method used for matching connections www.postgresql.org/docs/9.3/static/ auth-pg-hba-conf.html Sarah Conway Postgres Open
  • 19. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL auth-method parameters auth-method - Speci
  • 20. es authentication method for use when match is found trust - Allows full access to user; can login as any existing user reject - Rejects all access to speci
  • 21. c connections/hosts md5 - Requires user to provide password Password is md5-salted-and-hashed by client password - Requires user to provide password Password stored/sent in clear-text gss - Uses GSSAPI TCP/IP connections only sspi - Uses SSPI Windows OS only krb5 - Uses Kerberos V5 TCP/IP connections only Sarah Conway Postgres Open
  • 22. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL auth-method parameters, cont. ident - Contacts ident server on client, checks if client username matches database user name TCP/IP connections only peer - Checks for match between client username and database user name Local connections only ldap - Uses LDAP server radius - Uses RADIUS server cert - Uses SSL client certi
  • 23. cates pam - Uses Pluggable Authentication Modules (PAM) service auth-options - Fields of the form name=value specify options for selected authentication method Sarah Conway Postgres Open
  • 24. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL SSL - Overview Normally used as a standard security technology for encrypting network connections Also used for authenticating users with certi
  • 26. cate issued by CA who authenticates user using a cryptographic public key Veri
  • 27. er cannot impersonate user Separates user from authentication method; not vulnerable to phishing Two-factor authentication recommended www.postgresql.org/docs/9.3/static/ssl-tcp.html Sarah Conway Postgres Open
  • 28. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL SSL Requires setting 'ssl' to 'on' in postgresql.conf Requires installation of SSL certi
  • 29. cates on client/server Files containing server certi
  • 30. cate and private key must exist Named server.crt and server.key by default Located in server's data directory Can rename or relocate by modifying ssl cert
  • 31. le and ssl key
  • 32. le Sarah Conway Postgres Open
  • 33. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL SSL - Server File Usage The following
  • 34. les (named by default) are relevant to SSL setup on server - ssl cert
  • 35. le - $PGDATA/server.crt Contents - server certi
  • 36. cate Sent to client to identify server ssl key
  • 37. le - $PGDATA/server.key Contents - server private key Proves server certi
  • 38. cate was sent by owner without showing if certi
  • 39. cate owner is trusted ssl ca
  • 40. le - $PGDATA/root.crt Contents - trusted certi
  • 41. cate authorities Checks that client certi
  • 42. cate is signed by trusted CA ssl crl
  • 43. le - $PGDATA/root.crl Contents - certi
  • 45. cate authorities. Lists blocked certi
  • 46. cates Sarah Conway Postgres Open
  • 47. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL SSL - Publicly Signed Certi
  • 49. es existence of the business, domain ownership, and user's authority Generate a cert signing request Submit CSR to the CA using their process, pay Wait for them to sign Download signed cert, install CA chain/signed cert with previously generated private key Domain Validated certi
  • 50. cates Entry-level Issued quickly Veri
  • 51. es only that the applicate owns domain name Sarah Conway Postgres Open
  • 52. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL Creating Self Signed Certi
  • 53. cates sudo su - cd /your/data/directory openssl genrsa -des3 -out server.key 1024 ssl rsa -in server.key -out server.key chmod 400 server.key chown postgres.postgres server.key Sarah Conway Postgres Open
  • 54. Introduction Authentication Authorization Accounting End postgresql.conf User Accounts Authentication Methods SSL Creating Self Signed Certi
  • 55. cates openssl req -new -text -out server.req openssl req -x509 -in server.req -text -key server.key -out server.crt cp server.crt root.crt #use text editor (vim, vi, etc) to edit pg_hba.conf #add following lines hostssl all www-data 0.0.0.0/0 hostssl all postgres 0.0.0.0/0 #use text editor (vim, vi, etc) to edit postgresql.conf ssl = on #restart postgres restart service postgresql Sarah Conway Postgres Open
  • 56. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges pg hba.conf Default Debian pg hba.conf: # Database administrative login by UNIX sockets local all postgres peer # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 peer # IPv6 local connections: host all all ::1/128 peer Sarah Conway Postgres Open
  • 57. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges pg hba.conf #Example pg_hba entries: #Single host allowed host all all 192.168.1.10/32 trust #Single host rejection host all all 192.168.1.10/32 reject #Single host connection to single database host foo all 192.168.1.10/32 md5 #Small network connection host all all 192.168.1.0/28 trust #Larger network connection host foo all 192.168.1.0/24 trust Sarah Conway Postgres Open
  • 58. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges CREATE ROLE with NOLOGIN Same as CREATE GROUP Creates group with particular privileges that users can be assigned to Authorization-based parameters (also applies to CREATE ROLE with LOGIN) replication, createdb, createrole, superuser Create user that is a superuser: CREATE ROLE saruman LOGIN SUPERUSER; Create administrative group and assign saruman to it: CREATE ROLE admin NOLOGIN SUPERUSER; GRANT admin TO saruman; ALTER ROLE saruman INHERIT; c - saruman set role admin; Sarah Conway Postgres Open
  • 59. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges GRANT/REVOKE De
  • 60. ne/remove access privileges to database objects Can grant privileges on tables, columns, views, databases, sequences, domains, foreign data wrappers, foreign servers, functions, procedural languages, large objects, schemas, tablespaces, types Schema level privileges disabled by default Grant/revoke role membership www.postgresql.org/docs/9.3/static/sql-grant.html www.tutorialspoint.com/postgresql/postgresql_ privileges.htm Sarah Conway Postgres Open
  • 61. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges GRANT - Example Grant all privileges on schema mordor to group role admin: CREATE SCHEMA mordor; CREATE TABLE mordor.ring(id int); GRANT ALL PRIVILEGES ON SCHEMA mordor TO admin; Sarah Conway Postgres Open
  • 62. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges REVOKE - Example REVOKE ALL PRIVILEGES ON SCHEMA PUBLIC FROM saruman; REVOKE ALL ON FUNCTION foo() FROM GROUP PUBLIC; REVOKE ALL PRIVILEGES ON SCHEMA PUBLIC FROM PUBLIC; Sarah Conway Postgres Open
  • 63. Introduction Authentication Authorization Accounting End pg hba.conf Access Privileges ALTER DEFAULT PRIVILEGES De
  • 64. ne your own default privileges DROP OWNED BY to drop default privilege entry for role Required to drop role with changed default settings Grant SELECT to public for all tables created under schema mordor: ALTER DEFAULT PRIVILEGES IN SCHEMA mordor GRANT SELECT ON TABLES TO PUBLIC; Sarah Conway Postgres Open
  • 65. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging Access Privilege Inquiry Functions pg has role has any column privilege has database privilege has column privilege has schema privilege etc. for function, foreign data wrapper, sequence, table, tablespace If user argument omitted, current user is assumed www.postgresql.org/docs/9.3/static/ functions-info.html Sarah Conway Postgres Open
  • 66. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging Access Privilege Inquiry Functions test=#SELECT has_table_privilege('frodo','mordor.ring','select'); has_table_privilege --------------------- t (1 row) Sarah Conway Postgres Open
  • 67. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging psql ndp - Obtains information about current privileges for existing database objects nddp - Obtains information about default privilege assignments ndu - Obtains information about the list of existing roles All are only available in psql www.postgresql.org/docs/9.3/static/app-psql.html Sarah Conway Postgres Open
  • 68. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging postgresql.conf log destination, log directory, log
  • 69. lename Locate logs log connections, log pid, log statement, log duration, log timestamp Logs respective items debug print parse, debug print rewritten, debug print plan Enables various debugging output to be sent to server log debug pretty print Sends debugging output in an longer, indented, more readable format hostname lookup Shows hostname in logs Sarah Conway Postgres Open
  • 70. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging csvlog Displays log lines in
  • 71. les, with abilty to import into table Ecient way to view important logs at once Displays concise list of information with options to add or remove speci
  • 72. ed
  • 73. les Time stamp, username, databse name, PID, SID, client host:port, per-session line number, command tag, session start, virtual/regular transaction IDs, error severity, etc... Sarah Conway Postgres Open
  • 74. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging Importing csvlog COPY postgres log FROM '/full/path/to/log
  • 75. le.csv' WITH csv; Set log
  • 76. lename and log rotation age to predict what
  • 77. lename will be, and when
  • 78. les are ready for import Set log truncate on rotation to avoid mixing old data with new Sarah Conway Postgres Open
  • 79. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging Event Triggers Newly introduced in 9.3, still being expanded Capable of capturing DDL events Global to a speci
  • 80. ed database Can be written in any procedural language with event trigger support Sarah Conway Postgres Open
  • 81. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging pgaudit https://github.com/2ndQuadrant/pgaudit Based on event triggers Collects audit events and logs in CSV log format Supports DDL, DML, and utility commands Sarah Conway Postgres Open
  • 82. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging audit-trigger https://github.com/2ndQuadrant/audit-trigger Attached to a single table Captures DML events only Script generates an audit trigger for each table in database Easily modi
  • 83. able Sarah Conway Postgres Open
  • 84. Introduction Authentication Authorization Accounting End Inspecting Privileges Logging pgbadger https://github.com/dalibo/pgbadger Add-on that analyzes logs and compiles results into csvlog, syslog, or stderr Built to be quick Written in Perl Mostly performance reports Sarah Conway Postgres Open
  • 85. Introduction Authentication Authorization Accounting End Questions? Thank You! Sarah Conway Postgres Open