Thursday, February 28, 2019

TACACS How It Works

TACACS adalah implementasi dari konsep AAA (Authentication, Authorization, Accounting).

Dalam konsep tsb ada 3 devices:

1. NAC: Network Access Client
2. NAS: Network Access Server
3. TACACS Server

Dan ada 7 message type TACACS:

3 untuk Authentication

Authentication START (It describes the type of authentication to be performed, and may contain the username and some authentication data. The START packet is only ever sent as the first message in a TACACS+ authentication session.).

Authentication REPLY (It indicates whether the authentication is finished, or whether it should continue. If the REPLY indicates that authentication should continue, then it will also indicate what new information is requested.).

Authentication CONTINUE (It is sent from the NAS to the server following the receipt of a REPLY packet and possibly contains requested information.).


2 untuk Authorization

Authorization REQUEST (It contains a fixed set of fields that describe the authenticity of the user or process, and a variable set of arguments that describes the services and options for which authorization is requested.).

Authorization RESPONSE (It contains a variable set of response arguments (attribute-value pairs) which can restrict or modify the client actions.).

2 untuk Accounting

Accounting REQUEST (It conveys information used to provide accounting for a service provided to a user.).

Accounting REPLY (It is used to indicate that the accounting function on the server has completed and securely
committed the record.).

Apa beda Authentication dan Authorization?

Secara sederhana adalah bahwa: Authentication itu untuk mengotentikasi apakah user terdaftar dan boleh masuk kedalam device/jaringan. Sekedar masuk saja. Pada tahap setelah masuk maka user bisa melakukan view, atau ekesekusi command terbatas (exec) seperti PING dan Traceroute.

Apabila user ingin mengubah-ubah setting, maka user tsb perlu di Authorization.

Berikut perbedaan nya.


Gambar diatas, apabila di R1 hanya di set Authentication saja, maka user1 hanya akan dapat prompt R1>

Namun apabila di R1 Authorization juga di set, maka R1 akan bertanya ke TACACS, user1 privilege nya berapa? Apabila dijawab 15 (privilege tertinggi) maka user 1 akan dapat prompt R1#


Di R1 kita bisa mendefinisikan privilege yang lebih rendah dari 15. Misalkan privilege 7.

(Catatan: privilege 0, 1, 15 di set oleh System, jangan di ubah).

Misalkan ada server MRTG yang akan akses R1 untuk connnect SNMP.

Maka kita buat satu user baru yaitu snmp1 di TACACS Server, dan user ini hanya boleh:

1. eksekusi command ping, config terminal, configure
2. configure snmp-server host, snmp-server enable, snmp-server

Agar akses user1 di R1 di batasi dengan kriteria diatas, maka kriteria tsb kita buatkan masuk kedalam privilege 7.

Maka di R1, kita akan set privilege 7 sbb:

aaa new-model
aaa authentication login default group tacacs+ local
aaa authorization exec default group tacacs+ local
username backup privilege 7 password 0 backup
tacacs-server host 192.168.1.1
tacacs-server key cisco
privilege configure level 7 snmp-server host
privilege configure level 7 snmp-server enable
privilege configure level 7 snmp-server
privilege exec level 7 ping
privilege exec level 7 configure terminal
privilege exec level 7 configure
Dan di TACACS server kita create 

user: snmp1 
password: snmp1
access list: allow NAC <ip server mrtg> , NAS: 172.168.1.1
privilege: 7

Namun mode privilege ini ada 2 kelemahannya, yaitu user dengan level tertentu bisa acccess level di bawahnya, dan yang diterima hanya command saja, tidak bisa argument. Contoh:



privilege exec level 7 configure terminal
sama artinya dengan

privilege exec level 7 configure


No comments: