<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/url_helper.py, branch circinus-public-unmaintained</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2022-02-12T04:40:45+00:00</updated>
<entry>
<title>sources/azure: address mypy/pyright typing complaints (#1245)</title>
<updated>2022-02-12T04:40:45+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-02-12T04:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0b41b359a70bbbf3a648862a9b849d60b9ff6c3b'/>
<id>urn:sha1:0b41b359a70bbbf3a648862a9b849d60b9ff6c3b</id>
<content type='text'>
Raise runtime errors for unhandled cases which would cause other
exceptions.  Ignore types for a few cases where a non-trivial
refactor would be required to prevent the warning.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<entry>
<title>Remove distutils usage (#1177)</title>
<updated>2022-01-12T19:52:32+00:00</updated>
<author>
<name>Shreenidhi Shedi</name>
<email>53473811+sshedi@users.noreply.github.com</email>
</author>
<published>2022-01-12T19:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=e3f3485d875f021915654bf2b64678e151a8d6f6'/>
<id>urn:sha1:e3f3485d875f021915654bf2b64678e151a8d6f6</id>
<content type='text'>
distutils is getting deprecated soon. Let's replace it with suggested
alternatives as suggested in:
https://www.python.org/dev/peps/pep-0632/

Remove `requests` version check and related code from url_helper.py
as the versions specified are old enough to no longer be relevant.

Signed-off-by: Shreenidhi Shedi &lt;sshedi@vmware.com&gt;</content>
</entry>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>tox: bump the pylint version to 2.6.0 in the default run (#544)</title>
<updated>2020-08-25T15:21:18+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2020-08-25T15:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=07104504ab5b30efd2d1f7a8c36effe18b8e5fe0'/>
<id>urn:sha1:07104504ab5b30efd2d1f7a8c36effe18b8e5fe0</id>
<content type='text'>
Changes:

tox: bump the pylint version to 2.6.0 in the default run
Fix pylint 2.6.0 W0707 warnings (raise-missing-from)</content>
</entry>
<entry>
<title>ec2: only redact token request headers in logs, avoid altering request (#230)</title>
<updated>2020-03-03T22:23:33+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-03-03T22:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=fa1abfec27050a4fb71cad950a17e42f9b43b478'/>
<id>urn:sha1:fa1abfec27050a4fb71cad950a17e42f9b43b478</id>
<content type='text'>
Our header redact logic was redacting both logged request headers and
the actual source request. This results in DataSourceEc2 sending the
invalid header "X-aws-ec2-metadata-token-ttl-seconds: REDACTED" which
gets an HTTP status response of 400.

Cloud-init retries this failed token request for 2 minutes before
falling back to IMDSv1.

LP: #1865882</content>
</entry>
<entry>
<title>ec2: Do not log IMDSv2 token values, instead use REDACTED (#219)</title>
<updated>2020-02-19T21:01:09+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2020-02-19T21:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=87cd040ed8fe7195cbb357ed3bbf53cd2a81436c'/>
<id>urn:sha1:87cd040ed8fe7195cbb357ed3bbf53cd2a81436c</id>
<content type='text'>
Instead of logging the token values used log the headers and replace the actual
values with the string 'REDACTED'.  This allows users to examine cloud-init.log
and see that the IMDSv2 token header is being used but avoids leaving the value
used in the log file itself.

LP: #1863943
</content>
</entry>
<entry>
<title>Start removing dependency on six (#178)</title>
<updated>2020-01-21T22:15:30+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-21T22:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=8c4fd886931abcf2cc8627a47463907d655b35c3'/>
<id>urn:sha1:8c4fd886931abcf2cc8627a47463907d655b35c3</id>
<content type='text'>
* url_helper: drop six

* url_helper: sort imports

* log: drop six

* log: sort imports

* handlers/__init__: drop six

* handlers/__init__: sort imports

* user_data: drop six

* user_data: sort imports

* sources/__init__: drop six

* sources/__init__: sort imports

* DataSourceOVF: drop six

* DataSourceOVF: sort imports

* sources/helpers/openstack: drop six

* sources/helpers/openstack: sort imports

* mergers/m_str: drop six

This also allowed simplification of the logic, as we will never
encounter a non-string text type.

* type_utils: drop six

* mergers/m_dict: drop six

* mergers/m_list: drop six

* cmd/query: drop six

* mergers/__init__: drop six

* net/cmdline: drop six

* reporting/handlers: drop six

* reporting/handlers: sort imports
</content>
</entry>
<entry>
<title>url_helper: read_file_or_url should pass headers param into readurl (#66)</title>
<updated>2019-12-02T23:24:18+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2019-12-02T23:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f69d33a723b805fec3ee70c3a6127c8cadcb02d8'/>
<id>urn:sha1:f69d33a723b805fec3ee70c3a6127c8cadcb02d8</id>
<content type='text'>
Headers param was accidentally omitted and no longer passed through to
readurl due to a previous commit.

To avoid this omission of params in the future, drop positional param
definitions from read_file_or_url and pass all kwargs through to readurl
when we are not operating on a file.

In util:read_seeded, correct the case where invalid positional param
file_retries was being passed into read_file_or_url.

Also drop duplicated file:// prefix addition from read_seeded because
read_file_or_url does that work anyway.

LP: #1854084</content>
</entry>
<entry>
<title>ec2: Add support for AWS IMDS v2 (session-oriented) (#55)</title>
<updated>2019-11-23T03:05:44+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2019-11-23T03:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4bc399e0cd0b7e9177f948aecd49f6b8323ff30b'/>
<id>urn:sha1:4bc399e0cd0b7e9177f948aecd49f6b8323ff30b</id>
<content type='text'>
* ec2: Add support for AWS IMDS v2 (session-oriented)

AWS now supports a new version of fetching Instance Metadata[1].

Update cloud-init's ec2 utility functions and update ec2 derived
datasources accordingly.  For DataSourceEc2 (versus ec2-look-alikes)
cloud-init will issue the PUT request to obtain an API token for
the maximum lifetime and then all subsequent interactions with the
IMDS will include the token in the header.

If the API token endpoint is unreachable on Ec2 platform, log a
warning and fallback to using IMDS v1 and which does not use
session tokens when communicating with the Instance metadata
service. 

We handle read errors, typically seen if the IMDS is beyond one 
etwork hop (IMDSv2 responses have a ttl=1), by setting the api token
to a disabled value and then using IMDSv1 paths.

To support token-based headers, ec2_utils functions were updated
to support custom headers_cb and exception_cb callback functions
so Ec2 could store, or refresh API tokens in the event of token
becoming stale.

[1] https://docs.aws.amazon.com/AWSEC2/latest/ \
UserGuide/ec2-instance-metadata.html \
#instance-metadata-v2-how-it-works</content>
</entry>
<entry>
<title>Small typo fixes in code comments.</title>
<updated>2019-10-16T13:49:43+00:00</updated>
<author>
<name>Dominic Schlegel</name>
<email>dominic.schlegel@hostpoint.ch</email>
</author>
<published>2019-10-16T13:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=26e1f063677d974ab3b1a48e010e732a538b9a8d'/>
<id>urn:sha1:26e1f063677d974ab3b1a48e010e732a538b9a8d</id>
<content type='text'>
</content>
</entry>
</feed>
