-
Notifications
You must be signed in to change notification settings - Fork 731
Migrate AAA table per-command authorization in db_migrator #3296
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
Migrate AAA table per-command authorization in db_migrator #3296
Conversation
This PR is based on per-command accounting migrate PR: #3284 |
tacplus_config = self.configDB.get_entry('TACPLUS', 'global') | ||
if 'passkey' in tacplus_config and '' != tacplus_config.get('passkey'): | ||
authorization = self.configDB.get_entry('AAA', 'authorization') | ||
if not authorization: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to your comments in #3284:
qiluo-msft 2 weeks ago
The old image's enablement does not matter. As long as the required passkey is there, and intention is to enable, then we should enable.
So, we only check the new config:
New_config | Action |
---|---|
Passkey does not exist | Not enable |
Passkey exist, Authorization enable | Enable |
Passkey exist, Authorization not enable | Not enable |
self.configDB.set_entry("AAA", "authorization", authorization_new) | ||
log.log_info('Migrate AAA authorization: {}'.format(authorization_new)) | ||
else: | ||
# If no passkey, setup per-command authorization will block remote user command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, disable authorization by delete entry.
…#3296) Migrate AAA table per-command authorization in db_migrator #### Why I did it per-command AAA need enable in warm-upgrade case #### How I did it Add code to migrate per-command aunthorization #### How to verify it Pass all test case. Add new test case. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Migrate AAA table per-command authorization in db_migrator #### A picture of a cute animal (not mandatory but encouraged)
Cherry-pick PR to 202311: #3330 |
Migrate AAA table per-command authorization in db_migrator #### Why I did it per-command AAA need enable in warm-upgrade case #### How I did it Add code to migrate per-command aunthorization #### How to verify it Pass all test case. Add new test case. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Migrate AAA table per-command authorization in db_migrator #### A picture of a cute animal (not mandatory but encouraged)
…#3296) Migrate AAA table per-command authorization in db_migrator #### Why I did it per-command AAA need enable in warm-upgrade case #### How I did it Add code to migrate per-command aunthorization #### How to verify it Pass all test case. Add new test case. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Migrate AAA table per-command authorization in db_migrator #### A picture of a cute animal (not mandatory but encouraged)
…#3296) Migrate AAA table per-command authorization in db_migrator #### Why I did it per-command AAA need enable in warm-upgrade case #### How I did it Add code to migrate per-command aunthorization #### How to verify it Pass all test case. Add new test case. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Migrate AAA table per-command authorization in db_migrator #### A picture of a cute animal (not mandatory but encouraged)
Migrate AAA table per-command authorization in db_migrator
Why I did it
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)