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

Bump ip from 2.0.0 to 2.0.1 in /assets #1255

Open
wants to merge 60 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
31e7aac
Merge staging to main with proxy updates
jdonis Jan 16, 2024
077f125
fix function error
jdonis Jan 16, 2024
48afbf7
oproxy
jdonis Jan 22, 2024
1ab19db
test proxy
jdonis Jan 23, 2024
220ec07
tuples proxy
jdonis Jan 23, 2024
a5914e7
challenge-cproxy
jdonis Jan 24, 2024
b1ee9ad
oproxy server
jdonis Jan 24, 2024
3c13f7e
verify none
jdonis Feb 8, 2024
512cc9e
nxdomin
jdonis Feb 8, 2024
73ec86a
remove http
jdonis Feb 8, 2024
6d5d284
remove ssl verify
jdonis Feb 8, 2024
1009f6f
add https
jdonis Feb 8, 2024
1ec4656
verify none
jdonis Feb 8, 2024
742e895
verify none nxdomain
jdonis Feb 8, 2024
4d05e4b
proxy path
jdonis Feb 8, 2024
3c6b132
remove https
jdonis Feb 8, 2024
026f27d
ssl options
jdonis Feb 8, 2024
c348cb0
ssl options 2
jdonis Feb 8, 2024
1eee9da
ssl options https
jdonis Feb 8, 2024
a9ae418
ssl options https+port
jdonis Feb 8, 2024
5385486
ssl options https+port-hackey
jdonis Feb 8, 2024
d57fc1d
ssl options http+port-hackey
jdonis Feb 8, 2024
6df5d28
ssl options 2
jdonis Feb 8, 2024
5f47456
ssl options 3
jdonis Feb 8, 2024
97691c5
ssl options 3
jdonis Feb 8, 2024
88f40ad
use config
jdonis Feb 9, 2024
993ad09
use mix.config
jdonis Feb 9, 2024
e373ded
use mix.config
jdonis Feb 9, 2024
8a36baa
remove https
jdonis Feb 9, 2024
877954f
remove https
jdonis Feb 9, 2024
02e5e8f
verify
jdonis Feb 9, 2024
43a2595
ssl options
jdonis Feb 9, 2024
c3f8d01
ssl options
jdonis Feb 9, 2024
74beb3d
ssl options cert
jdonis Feb 9, 2024
1fba7b7
port + link
jdonis Feb 9, 2024
ff6381e
TLSV
jdonis Feb 9, 2024
7d13c9f
rm pool
jdonis Feb 9, 2024
3f88e38
rm pool
jdonis Feb 9, 2024
27fbdd3
rm pool
jdonis Feb 9, 2024
5457192
ssl opts
jdonis Feb 9, 2024
19e1828
ssl opts
jdonis Feb 9, 2024
c208a61
simplify
jdonis Feb 9, 2024
9d6ed5f
port+link
jdonis Feb 9, 2024
5322ad9
URL+PORT
jdonis Feb 11, 2024
64e82bc
8080 port
jdonis Feb 12, 2024
6e7eb87
mix format
jdonis Feb 12, 2024
b63baae
URL+port
jdonis Feb 12, 2024
d6302b5
61443 back
jdonis Feb 12, 2024
1f1c980
update to proxy via 8080
LordCrispy Feb 19, 2024
453b365
Attempt to resolve format issue
LordCrispy Feb 19, 2024
8a34fd9
Revert back with 8080 change
LordCrispy Feb 19, 2024
fd7877b
Revert back to LKG
LordCrispy Feb 19, 2024
fa2bdd4
Try to put to good
LordCrispy Feb 19, 2024
873286f
Resolved format, trying to add 8080
LordCrispy Feb 19, 2024
805c7c2
Comment out request options to clear lint and then add proxy options
LordCrispy Feb 19, 2024
068ce4c
Attempt to clear lint
LordCrispy Feb 19, 2024
24c91bf
Remove process request options for proxy
LordCrispy Feb 19, 2024
a4f1f4a
Add proxy_options variable to test lint before implementation.
LordCrispy Feb 19, 2024
1e6d681
Add proxy to each function using get and post
LordCrispy Feb 19, 2024
7afd949
Bump ip from 2.0.0 to 2.0.1 in /assets
dependabot[bot] Feb 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3127,9 +3127,9 @@ interpret@^2.2.0:
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==

ip@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
version "2.0.1"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==

is-absolute-url@^2.0.0:
version "2.1.0"
Expand Down
24 changes: 15 additions & 9 deletions lib/challenge_gov/login_gov.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,30 @@ defmodule ChallengeGov.LoginGov do

alias ChallengeGov.LoginGov.Token

def get_well_known_configuration(idp_authorize_url) do
proxy_options = [
{:proxy, {"http://challengecproxy.apps.internal", 8080}},
{:follow_redirect, true}
]

def get_well_known_configuration(idp_authorize_url, proxy_options) do
idp_authorize_url
|> uri_join("/.well-known/openid-configuration")
|> get()
|> handle_response("Sorry, could not fetch well known configuration")
|> get([], proxy_options)

# |> handle_response("Sorry, could not fetch well known configuration")
end

def get_public_key(jwks_uri) do
def get_public_key(jwks_uri, proxy_options) do
jwks_uri
|> get()
|> get([], proxy_options)
|> handle_response("Sorry, could not fetch public key")
|> case do
{:ok, body} -> {:ok, body |> Map.fetch!("keys") |> List.first()}
foo -> foo
end
end

def exchange_code_for_token(code, token_endpoint, jwt) do
def exchange_code_for_token(code, token_endpoint, jwt, proxy_options) do
body = %{
grant_type: "authorization_code",
code: code,
Expand All @@ -33,13 +39,13 @@ defmodule ChallengeGov.LoginGov do
}

token_endpoint
|> post(Poison.encode!(body), [{"Content-Type", "application/json"}])
|> post(Poison.encode!(body), [{"Content-Type", "application/json"}], proxy_options)
|> handle_response("Sorry, could not exchange code")
end

def get_user_info(userinfo_endpoint, access_token) do
def get_user_info(userinfo_endpoint, access_token, proxy_options) do
userinfo_endpoint
|> get([{"Authorization", "Bearer " <> access_token}])
|> get([{"Authorization", "Bearer " <> access_token}], proxy_options)
|> handle_response("Sorry, could not fetch userinfo")
end

Expand Down
2 changes: 1 addition & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults: &defaults
applications:
- name: challenge-portal-dev
<<: *defaults
instances: 1
instances: 1
disk_quota: 6GB
env:
MIX_ENV: prod
Expand Down