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

Use keytab by environment variable #91

Merged
merged 2 commits into from
Dec 2, 2019
Merged

Use keytab by environment variable #91

merged 2 commits into from
Dec 2, 2019

Conversation

kuenishi
Copy link
Member

No description provided.

@kuenishi kuenishi added the cat:feature Implementation that introduces new interfaces. label Nov 29, 2019
self.keytab_path = keytab_path
if self.keytab_path is None:
self.keytab_path = os.getenv("CHAINERIO_KEYTAB")
Copy link
Member

Choose a reason for hiding this comment

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

How about renaming it "CHAINERIO_HDFS_KEYTAB"?

@@ -28,14 +28,22 @@ Toplevel Functions
.. autoclass:: chainerio.container.Container
:members:


.. note:: With environment variable
``CHAINERIO_KEYTAB=path/to/your.keytab`` set, ``hdfs``
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@kuenishi
Copy link
Member Author

I have changed the whole design to use KRB5_KTNAME , env variable for kinit which is supported by krbticket 1.0.1 .

Copy link
Member

@belldandyxtq belldandyxtq left a comment

Choose a reason for hiding this comment

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

Overall, LGTM

# variable. If /etc/krb5.keytab doesn't exist, krbticket
# tries to update the ticket with ``kinit -R`` as much as
# possible.
self.ticket = KrbTicket.init(self.username)
Copy link
Member

Choose a reason for hiding this comment

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

Is the update needed when we do not have the keytab?

Copy link
Member Author

Choose a reason for hiding this comment

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

Please read the code comment above

Copy link
Member

Choose a reason for hiding this comment

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

I meant do we have to update the ticket even if we do not have the keytab?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Ticket expiration date can be renewable until renewable date by kinit -R and the former is usually earlier than latter, like hours or days.

Copy link
Member

Choose a reason for hiding this comment

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

I see

@belldandyxtq belldandyxtq merged commit 23ea376 into master Dec 2, 2019
@kuenishi kuenishi deleted the use-keytab branch January 31, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants