RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service...

51
Monday 23 May 2016 | RIPE72 RIPE Database Tips & Tricks

Transcript of RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service...

Page 1: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Monday 23 May 2016 | RIPE72

RIPE Database Tips & Tricks

Page 2: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 2

Agenda

• Global Resource Service

• Single Sign On

• PGP Updates

• Created and Last Modified

• Partial Route Object creation

Page 3: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

GRSHow to find stuff that’s not from us

Page 4: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 4

Global Resource Service

• Allows you to query other RIRs databases- And two Internet Routing Registries

• Using the RIPE Database interface

• Returns RIPE Routing Policy Specification Language (RPSL) formatted objects- So everything looks familiar

• Also available in JSON and XML output

Page 5: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 5

How can we query?

• In Webupdates:

Page 6: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 6

How can we query?

• Command line:

whois --resource as123% This is the RIPE Database query service.% The objects are in RPSL format.%% The RIPE Database is subject to Terms and Conditions.% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Information related to 'AS123'

aut-num: AS123org: 7ESGas-name: LOGAIRCOMNET-ASchanged: [email protected] 20000101source: ARIN-GRSremarks: ****************************remarks: * THIS OBJECT IS MODIFIEDremarks: * Please note that all data that is generally regarded as personalremarks: * data has been removed from this object.remarks: * To view the original object, please query the ARIN Database at:remarks: * http://www.arin.net/remarks: ****************************

Page 7: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 7

Another example

• Command line:whois -a as123

as-block: AS29 - AS136descr: ASN block not managed by the RIPE NCCremarks: ———————————————————————————

as-block: AS29 - AS136descr: ARIN ASN blockremarks: These AS numbers are further assigned by ARINremarks: to ARIN members and end-users in the ARIN region.

aut-num: AS123org: 7ESGas-name: LOGAIRCOMNET-ASchanged: [email protected] 20000101source: ARIN-GRSremarks: ****************************remarks: * THIS OBJECT IS MODIFIEDremarks: * Please note that all data that is generally regarded as personalremarks: * data has been removed from this object.remarks: * To view the original object, please query the ARIN Database at:remarks: * http://www.arin.net/remarks: ****************************

Page 8: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 8

Personal data

• Because of European privacy laws, no personal information is visible

• Only AS Numbers, IP addresses, ORG objects, route and route 6 objects

• No risk of being blocked because you queried to many objects

Page 9: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 9

Dummy Objects

• Some attribute values will be replaced by dummy data

• For example:- Author

- Admin-c and Tech-c

• Or dummy values are created for missing mandatory attributes

Page 10: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 10

Differences

• - -resource- returns only aut-num, inet(6)num, route(6), domain

- doesn’t return referenced objects

- -i doesn’t work

• -a- you can specify which sources

- returns referenced objects (even person) if they’re in RIPE DB

Page 11: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

SSOYour one stop shop

Page 12: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 12

Why Single Sign On?

• We started in 2011 with SSO

• There were to many different log-in credentials for different services- Labs

- LIR Portal

- RIPE Database

- Atlas

- Academy

Page 13: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 13

Anyone can create SSO

• Easy to create

• Mail address and self chosen password

• Can be linked to one or multiple LIRs- To use for the LIR Portal

- To use for authentication in the RIPE Database

Page 14: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 14

Create a RIPE NCC Access Account

http://access.ripe.net

Page 15: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 15

Security

• In audit logs, there is per-user granularity

• Two factor authentication

• Lost password is less cumbersome- Provided that your e-mail address still works

Page 16: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 16

SSO and the RIPE Database

• Since 2014 you can use SSO in the RIPE Database

• It is simple to add it to your maintainer- Log in with your SSO account to Webupdates

- Modify your maintainer

- Add SSO as your authentication (default)

- Remove MD5 if you want

Page 17: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 17

Default Authentication: SSO

• If you create a new maintainer: - your SSO account will be the authentication by default

Page 18: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 18

MD5 and the RIPE Database

• We used to publish the MD5 hash in the RIPE Database

• These hashes could be computed and the the passwords discovered

• So we hid the hashes

• In 2015 we blocked all the maintainers with an unchanged password since 2011

Page 19: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 19

How to add SSO to your mntner

• Make sure you are logged in

Page 20: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 20

How to add SSO to your mntner

Page 21: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 21

How to add SSO to your mntner

default!

Page 22: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 22

2 Factor Authentication

• Optional but recommended security feature

• Once enabled it requires a six digit security code in addition to your password

• Security code is generated by an authenticator app - Using Time-based One-Time Passwords (TOTP)

Page 23: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 23

Set up 2 Factor Authentication

Page 24: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

PGPSecuring your email updates

Page 25: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 25

Generate an RSA key

Page 26: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 26

Generate RSA Key

Page 27: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 27

Export

Page 28: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 28

Save new Key

Page 29: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 29

Copy and Paste into a Text Editor

Page 30: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 30

Now Create a key-cert Object

• Just a couple of mandatory attributes

• Only “certif:” attribute is a bit annoying 😉

key-cert:  [mandatory] [single]   [primary/lookup key]

certif:    [mandatory] [multiple] [ ]

mnt-by:    [mandatory] [multiple] [inverse key]

source:    [mandatory] [single]   [ ]

Page 31: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 31

Edit the public key file…

• Open the public key in a text editor

• Paste “certif: ” in front of every line 😣

Page 32: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 32

Submit using Syncupdates or Mail…

Page 33: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 33

Add PGP authentication to mntner

• auth: PGP-868BAC0

• Now edit a mntner

• add this line:

Page 34: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 34

Now use it!

• Query object you want update- (protected by minter with PGP auth)

• Click Update

• Copy entire object into text editor

• Sign it

• Copy it back into Webupdates

• Click Submit

Page 35: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 35

Signed Text

Text

Signed Text

• Updated object is your text. Sign it!

Page 36: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 36

RIPE Database Interfaces and PGP

• Update objects protected by PGP mntner

- via email

- via Syncupdates

Page 37: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Created & Last ModifiedFor your logging pleasure

Page 38: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 38

The changed attribute

• The “changed” attribute was a mandatory attribute in every object

• Could be used for logging

Page 39: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 39

The changed attribute (deprecated!)

• This attribute has been deprecated!

• The community agreed it would be more useful to have a “created” and “last-modified” attribute

Page 40: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 40

Created and Last Modified

• All RIPE Database objects have now a “created” and “last modified” attribute

• In case we don’t have the correct date, we used 1 January 1970

• This data is automatically generated

Page 41: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 41

Description attributes

• Registration Services had a business rule to use the first description attribute for the legal company name

• RIPE Community reached consensus that this is not needed anymore

• Now we have the ORG object containing that information

Page 42: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Partial Route Object

Page 43: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

12lir

43

route and route6 Object (1 mntner)

route6: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEorigin: AS2mnt-by: LIR-MNT

inet6num: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-HM-MNTmnt-routes: LIR-MNT

aut-num: AS2

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-END-MNTmnt-by: LIR-MNT

Page 44: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

44

route and route6 Object (3 mntners)

route6: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEorigin: AS2mnt-by: END-MNT

inet6num: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-HM-MNTmnt-routes: LIR-MNT

aut-num: AS2

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-END-MNTmnt-by: AS-MNT

12liras999end72

Page 45: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

45

route and route6 Object (mnt-routes)

route6: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEorigin: AS2mnt-by: AS-MNT

inet6num: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-HM-MNTmnt-routes: LIR-MNT

aut-num: AS2

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-END-MNTmnt-by: AS-MNT

as999

mnt-routes: AS-MNT

Page 46: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 46

There is a better way

route6: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEorigin: AS2mnt-by: END-MNT

inet6num: 2001:db8::/32

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-HM-MNTmnt-routes: LIR-MNT

aut-num: AS2

tech-c: LA789-RIPEadmin-c: JD1-RIPEmnt-by: RIPE-NCC-END-MNTmnt-by: AS-MNT

end72

Page 47: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 47

E-mail notification

• An e-mail will be sent to the other maintainers contacts

Page 48: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 48

The email

Page 49: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Ferenc Csorba | RIPE 72 | 23 May 2016 49

Syncupdates

• The other maintainers create the exact same object in synch updates and authorise it

Page 50: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

Questions

Page 51: RIPE Database Tips & Tricks€¦ · Ferenc Csorba | RIPE 72 | 23 May 2016 4 Global Resource Service •Allows you to query other RIRs databases - And two Internet Routing Registries

51

Fin

Ende

KpajKonec

Son

Fine

Pabaiga

Einde

Fim

Finis

Koniec

Lõpp

Kрай

Sfârşit

Конeц

KrajVége

Kiнець

Slutt

Loppu

Τέλος

Y Diwedd

Amaia Tmiem

Соңы

Endir

Slut

Liðugt

An Críoch

Fund

הסוף

ËnnFinvezh

The End!

Beigas

Канeц