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

[Package Request] PHP Sodium #204

Closed
nwtben opened this issue Oct 10, 2022 · 23 comments
Closed

[Package Request] PHP Sodium #204

nwtben opened this issue Oct 10, 2022 · 23 comments
Labels
enhancement New feature or request packages Package request pending Will be addressed with an upcoming release
Milestone

Comments

@nwtben
Copy link

nwtben commented Oct 10, 2022

What package is missing from Amazon Linux 2022? Please describe and include package name.
php-sodium

Is this an update to existing package or new package request?
new package request

Is this package available in Amazon Linux 2?
yes

@stewartsmith stewartsmith added the enhancement New feature or request label Nov 4, 2022
@patricksebastien
Copy link

patricksebastien commented Mar 31, 2023

Useful to make an API with Laravel framework using laravel/passport

@ozbenh
Copy link

ozbenh commented Apr 3, 2023

I assume it replies on libsodium ? We have actually removed that one purposefully as nothing good comes from yet-another-crypto-library especially when it comes to security, compliance, and things like FIPS. We'll keep track of the requests nonetheless, thanks for the feedback.

@kpsoaren
Copy link

Laravel is a widely-used framework. Not including php-sodium and libsodium will keep us and many many other businesses from adopting AL2023.

@ozbenh
Copy link

ozbenh commented Apr 12, 2023

libsodium is also absent from other enterprise distros. As far as I know it isn't in any shape to be FIPS certified. Note that you always have the option of building the required dependencies from sources.

@ArronKing
Copy link

I had this problem too, if it helps any other PHP users here's how to get sodium installed on AL2023:

sudo yum install php8.1-devel php-pear gcc
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
// verify the file integrity https://libsodium.gitbook.io/doc/installation#integrity-checking
tar -xvzf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install
sudo pecl install -f libsodium
//add extension=sodium.so to php.ini

@rajjanorkar
Copy link

This is something we really need! Thank you

@neilcook
Copy link

I assume it replies on libsodium ? We have actually removed that one purposefully as nothing good comes from yet-another-crypto-library especially when it comes to security, compliance, and things like FIPS. We'll keep track of the requests nonetheless, thanks for the feedback.

"Nothing good". Except being able to run all the software that makes use of it. Heaven forfend that AL2023 should give developers a choice of crypto algorithms and implementations. And FIPS compliance is of course a requirement for every use-case for every application around the world. Oh wait.

@BernardRobbins
Copy link

BernardRobbins commented Jul 25, 2023

As an addon to @ArronKing excellent instructions
echo extension=sodium.so | sudo tee /etc/php.d/20-sodium.ini
​# clean up
sudo dnf autoremove php8.1-devel gcc
cd ..
rm -rf libsodium-stable LATEST.tar.gz

@ozbenh
Copy link

ozbenh commented Aug 11, 2023

We are evaluating inclusion of this package in our next quarterly release

@amazonlinux amazonlinux deleted a comment from faizanakram99 Aug 22, 2023
@stewartsmith
Copy link
Member

stewartsmith commented Aug 22, 2023

FYI: I've deleted a comment on this issue that wasn't being respectful.

A reminder from CONTRIBUTING.md:

This project has adopted the Amazon Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.

@faizanakram99
Copy link

FYI: I've deleted a comment on this issue that wasn't being respectful.

A reminder from CONTRIBUTING.md:

This project has adopted the Amazon Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.

What exactly was disrespectful and towards whom in that comment? And which rule from coc did it break?

Something which is part of core PHP since version 7.2 is missing from the latest images of Amazon, the ones shipping PHP 8.2, how is calling it out disrespectful?

@faizanakram99
Copy link

I had this problem too, if it helps any other PHP users here's how to get sodium installed on AL2023:

sudo yum install php8.1-devel php-pear gcc
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
// verify the file integrity https://libsodium.gitbook.io/doc/installation#integrity-checking
tar -xvzf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install
sudo pecl install -f libsodium
//add extension=sodium.so to php.ini

Thank you @ArronKing for making al2023 useable.

@BernardRobbins
Copy link

What exactly was disrespectful

Calling the team stupid. And the rest of your comment was vapid.

@faizanakram99
Copy link

faizanakram99 commented Aug 22, 2023

What exactly was disrespectful

Calling the team stupid. And the rest of your comment was vapid.

I called the action as stupid, not the team. The action of not shipping core extensions.

As far the rest of comment goes, it was about switching to a different cloud provider after PHP 8.1 is EOL if the images didn't include the core extensions. It shows the importance of extensions like sodium, deleting the comment and calling it vapid doesn't look respectful either.

@faizanakram99
Copy link

Okay, I have come to realize that I might have overreacted a bit, and if I hurt someone in the process, I apologize.

@ozbenh
Copy link

ozbenh commented Aug 23, 2023

The problem isn't the extension, the problem is libsodium which we don't currently ship. This is being looked at and considered for an upcoming quarterly release

@Frtrillo
Copy link

Frtrillo commented Sep 6, 2023

The problem isn't the extension, the problem is libsodium which we don't currently ship. This is being looked at and considered for an upcoming quarterly release

Thanks, waiting for it, laravel passport is a complete package and laravel is widely used even if it uses that library for crypto

@stewartsmith stewartsmith added packages Package request pending Will be addressed with an upcoming release labels Sep 9, 2023
@timsinakiran
Copy link

al2023 is pretty useless and older version don't have php8.2. . Probably time to switch all projects elsewhere. sigh.

@ozbenh
Copy link

ozbenh commented Sep 13, 2023

You might want to consider waiting for the upcoming quarterly release....

@victorPetrescuZonk
Copy link

This is a core package... pls. add it. Many major frameworks are impacted (ex Symfony, Laravel).

@stewartsmith stewartsmith added this to the AL2023.2 milestone Sep 20, 2023
@ozbenh
Copy link

ozbenh commented Sep 21, 2023

php-sodium has now been released as part of AL2023.2 for php 8.2 as a separate subpackage php8.2-sodium

@ozbenh ozbenh closed this as completed Sep 21, 2023
@MrTschi
Copy link

MrTschi commented Dec 27, 2023

@ozbenh any chance that it will also be published for 8.1? Magento2 has this as a dependency..

@limmike
Copy link

limmike commented Mar 8, 2024

for php 8.1, you can build it

              dnf install -y php-devel php-pear gcc
              pear update-channels
              pecl update-channels

                dnf install -y libsodium-devel
                yes 'no' | pecl install -f libsodium
                echo 'extension=sodium.so' > /etc/php.d/20-sodium.ini

run the above comments as root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request packages Package request pending Will be addressed with an upcoming release
Development

No branches or pull requests