Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TACACS+]: Add configuration support for TACACS+ #125

Merged
merged 8 commits into from
Dec 14, 2017

Conversation

liuqu
Copy link

@liuqu liuqu commented Oct 6, 2017

  • Add config and show commands for TACACS+

  • Add hostcfgd to listen configDB for TACACS+ and AAA, modify the
    pam configuration for Authentication in host.

    Signed-off-by: chenchen.qcc@alibaba-inc.com

* Add config and show commands for TACACS+
* Add hostcfgd to listen configDB for TACACS+ and AAA, modify the
  pam configuration for Authentication in host.

  Signed-off-by: chenchen.qcc@alibaba-inc.com
Liuqu added 3 commits December 1, 2017 17:16
* Add help comments for TACACS+ command
* Use 'default' command to recover TACACS+ configuration

 Signed-off-by: chenchen.qcc@alibaba-inc.com
* The method set_entry in class ConfigDBConnector has changed to
  update all column key-value tuples. Modify the config command to
  adapt to this API change.

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
@liuqu
Copy link
Author

liuqu commented Dec 7, 2017

Move hostcfgd to sonic-buildimage [TACACS+]: Add configDB enforcer for TACACS+ #1214

@lguohan
Copy link
Contributor

lguohan commented Dec 7, 2017

can you resolve the conflict? also can you list all command list provided in your commit message.

@lguohan
Copy link
Contributor

lguohan commented Dec 7, 2017

@jleveque to review.

@lguohan lguohan requested a review from jleveque December 7, 2017 11:13
Liuqu added 2 commits December 8, 2017 00:52
* Command list
  config aaa authentication login [{tacacs+, local} | default]
  config aaa authentication failthrough [enable | disable | default]
  config tacacs passkey <TEXT>
  config tacacs authtype [pap | chap | mschap]
  config tacacs timeout <0-60>
  config tacacs add <ip_address> --port <1–65535>
                                 --timeout <1–60>
                                 --key <TEXT>
                                 --type [pap | chap | mschap]
                                 --pri <1-64>
  config tacacs delete <ip_address>
  show aaa
  show tacacs

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
@liuqu
Copy link
Author

liuqu commented Dec 7, 2017

@lguohan The conflict has been resolved. The command list is amended to the last commit message.

config/aaa.py Outdated
return True


def set_entry(table, entry, data):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the semantic of set_entry is changed in this sonic-net/sonic-py-swsssdk@b7861cc.

if you still want to use the existing semantic, you can use mod_entry added in this sonic-net/sonic-py-swsssdk#25

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, it's better to use mod_entry.

* Replace set_entry with mod_entry when modify the specific key-value
  pair in configdb.

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
@click.command()
@click.argument('option', type=click.Choice(["enable", "disable", "default"]))
def failthrough(option):
"""Allow AAA fail-through [enable | disable | default]"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the default value here? enable/disable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gulv@str-s6000-on-4:~$ show aaa
AAA authentication login tacacs+,local

when it is set to default, what is the actual value? enable or disable? same question for failthrough

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value means there is no value for this configuration in configdb. For AAA authentication, the default is local authentication. For AAA fail-through, the default is enable.
I will add all the default value in the show command.

show/main.py Outdated
entry = data[row]
for key in entry:
output += ('AAA %s %s %s\n' % (row, key, str(entry[key])))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we print out the default values for fallback and fallthough?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll change it.

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
@lguohan lguohan merged commit 0fdd9f9 into sonic-net:master Dec 14, 2017
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
Without this change, leds were only set when an event happened.
Given that power supplies are assumed present by default, leds would never be set to `green`.
Instead they would have been left in the state the platform initialization left them (e.g `off`)
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
[SONIC_SFP] adding support for writing the eeprom address space inside sfputilbase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants