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

Remote IP is not authorized - apiUseWhitelist false not working? #15

Closed
JMDirksen opened this issue Nov 11, 2023 · 1 comment
Closed

Comments

@JMDirksen
Copy link

Issue

My API key pair has been generated with the 'Whitelisted IP' checkbox off.
I have no IP's in the Whitelisted IP's list.

I am unable to connect to the API.
I'm getting error: Remote IP is not authorized for this request; called from IP xxx.xxx.xxx.xxx

When I would add my remote IP to the whitelist it works as expected (The then generated Access tokens have the 'Whitelisted IP' propertie on Yes).

Running:
./tipctl.phar setup -n --apiUseWhitelist=false --loginName=myusername --apiPrivateKey="$(cat private.key)" -vvv

Result:

Box Requirements Checker
========================

> Using PHP 8.2.12
> PHP is using the following php.ini file:
  /usr/local/etc/php/php.ini

> Checking Box requirements:
  ✔ The application requires the version "^7.2.5|^8.0" or greater.
  ✔ The application requires the extension "json".
  ✔ The package "guzzlehttp/guzzle" requires the extension "json".
  ✔ The package "transip/transip-api-php" requires the extension "json".
  ✔ The package "transip/transip-api-php" requires the extension "openssl".
  
                                                                                
 [OK] Your system is ready to run the application.                              
                                                                                

Checking API connection to endpoint 'https://api.transip.nl/v6'

API connection failed!
Remote IP is not authorized for this request; called from IP xxx.xxx.xxx.xxx

So I'm not sure, but or there is something wrong with the API itself, not letting me use not-whitelisted IP's.
Or tipctl is not properly telling the API I want to login without whitelisted IP.

Can anybody replicate this issue or can I test something else?

Extra info
I'm building a docker container which should update my IP in DNS when my WAN IP changes (so I really can't use whitelisted IP).
Dockerfile so far:

FROM php:8.2-cli
WORKDIR /root
COPY . .
ADD --chmod=700 https://github.com/transip/tipctl/releases/latest/download/tipctl.phar tipctl.phar
RUN echo 'alias tipctl="/root/tipctl.phar"' >> ~/.bashrc
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
RUN ./tipctl.phar setup -n --apiUseWhitelist=false --loginName=myusername --apiPrivateKey="$(cat private.key)" -vvv
@svenwiltink
Copy link
Member

Fixed in 6.33.3. There was a bug in the non-interactive mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants