-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tacacs-plus server for playground
- Loading branch information
Showing
4 changed files
with
226 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3.8' | ||
|
||
services: | ||
tacacs-plus: | ||
container_name: tacacs-plus | ||
image: openswitch/tacacs_server:latest | ||
ports: | ||
- 49:49 | ||
restart: always | ||
command: tac_plus -G -d 24 -C /etc/tacacs/tac_plus.conf -l /dev/stdout | ||
volumes: | ||
- ./tac_plus.conf:/etc/tacacs/tac_plus.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
# key = "tac_test" | ||
|
||
# Set where to send accounting records | ||
default authentication = file /etc/passwd | ||
accounting syslog; | ||
accounting file = /var/log/tac_plus/tac_plus.acct | ||
|
||
# ACL for network_admin group | ||
|
||
acl = network_admin { | ||
# allow access from all sources | ||
permit = .* | ||
# implicit deny (ie: anything else) | ||
} | ||
|
||
# ACL for sys_admin group | ||
|
||
acl = sys_admin { | ||
# allow access from 10.10.10.250 only | ||
permit = .* | ||
# permit = ^10\.10\.10\.2$ | ||
# implicit deny (ie: anything else) | ||
} | ||
|
||
# network_admin group, full access to network devices | ||
|
||
group = network_admin { | ||
default service = permit | ||
acl = network_admin | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
} | ||
# sys_admin group, only has read access to the network devices and can change the access vlan on an interface | ||
|
||
group = sys_admin { | ||
default service = deny | ||
expires = "Jan 1 2015" | ||
acl = sys_admin | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
cmd = enable { | ||
permit .* | ||
} | ||
cmd = show { | ||
permit .* | ||
} | ||
cmd = exit { | ||
permit .* | ||
} | ||
cmd = configure { | ||
permit .* | ||
} | ||
cmd = interface { | ||
permit Ethernet.* | ||
permit FastEthernet.* | ||
permit GigabitEthernet.* | ||
} | ||
cmd = switchport { | ||
permit "access vlan.*" | ||
permit "trunk encapsulation.*" | ||
permit "mode.*" | ||
permit "trunk allowed vlan.*" | ||
} | ||
cmd = description { | ||
permit .* | ||
} | ||
} | ||
|
||
#user1 | ||
user = user1 { | ||
default service = permit | ||
pap = cleartext user1 | ||
service = exec { | ||
priv-lvl = 15 | ||
security-role = security-admin | ||
} | ||
} | ||
|
||
#user2 | ||
user = user2 { | ||
pap = cleartext user2 | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
} | ||
|
||
user = user_tac1 { | ||
default service = permit | ||
pap = cleartext tac | ||
service = exec { | ||
priv-lvl = 15 | ||
security-role = security-admin | ||
} | ||
} | ||
#user2 | ||
user = user_tac2 { | ||
pap = cleartext tac | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
} | ||
|
||
user = user_command { | ||
pap = cleartext com | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
} | ||
|
||
|
||
#user3 | ||
user = user3 { | ||
chap = cleartext user3 | ||
service = exec { | ||
priv-lvl = 15 | ||
} | ||
} | ||
|
||
#user4 | ||
user = user4 { | ||
chap = cleartext user4 | ||
} | ||
|
||
# User jonathanm using DES password and enable passwords | ||
|
||
user = jonathanm { | ||
member = network_admin | ||
login = des 6/1aYAL9zcCe. | ||
enable = des dBFJQefS4S4Jw | ||
} | ||
|
||
# User bob authenticating from the system /etc/passwd and the default enable password | ||
|
||
user = bob { | ||
login = file /etc/passwd | ||
member = sys_admin | ||
service = exec { | ||
priv-lvl = 11 | ||
} | ||
} | ||
|
||
user = root { | ||
member = network_admin | ||
} | ||
|
||
user = netop { | ||
login = file /etc/passwd | ||
member = network_admin | ||
} | ||
|
||
user = admin { | ||
pap = cleartext admin | ||
member = network_admin | ||
} | ||
|
||
user = sorin { | ||
login = cleartext topcik | ||
|
||
service = nfa { | ||
role = manager | ||
car = audi | ||
} | ||
} | ||
|
||
user = cristi { | ||
login = cleartext f30 | ||
|
||
service = nfa { | ||
role = pussykiller | ||
car = bmw | ||
chubby = yes | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters