-
Notifications
You must be signed in to change notification settings - Fork 84
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
Feature/cognito webpage redirect #149
Conversation
@@ -187,68 +184,3 @@ func newAWSSession() *session.Session { | |||
} | |||
return awsSession | |||
} | |||
|
|||
// WriteServerErrorWithResponse - Writes a server error with the specific message. | |||
func WriteServerErrorWithResponse(w http.ResponseWriter, message string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are used by accounts, usage, and credentials_web_page, so I moved them here to be more DRY.
// response message for the API | ||
func CreateAPIErrorResponse(responseCode int, | ||
func CreateAPIGatewayErrorResponse(responseCode int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to better distinguish from the ResponseWriter functions below.
/azp run dce#destroy |
Azure Pipelines successfully started running 1 pipeline(s). |
Sweet, taking a look now |
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> | ||
<script src="/api/auth/public/amazon-cognito-auth.min.js"></script> | ||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.536.0.min.js"></script> | ||
<script src="https://unpkg.com/vue"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we actually using vue.js for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The javascript is structured to use vuejs for convenience (i.e. data, methods, and mounted() are all vuejs constructs). I can rewrite it to not use vuejs, but it will take a bit of extra time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, no need to take the time now.
Just something to keep in mind (probably more dependency bloat than we need for something like this)
</head> | ||
|
||
<body> | ||
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need jQuery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently not, good catch.
<h1 class="center-text">DCE CLI Credentials</h1> | ||
<button @click="copyToClipboard()" class="js-textareacopybtn center-block">Copy To Clipboard</button> | ||
<textarea rows="10" cols="50" class="js-copytextarea center-block" id="credentialscontainer"></textarea> | ||
<button @click="signOut()" class="center-block">Sign Out</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a newline character to the end of the token, so I don't have to hit enter when I paste it into my terminal?
…ce into feature/cognito-webpage-redirect
@joshmarsh this is freaking awesome. Nice work on all this. |
/azp run dce#create |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run dce#destroy |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run dce#destroy |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -16,7 +16,6 @@ | |||
</head> | |||
|
|||
<body> | |||
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Proposed changes
WithParameterStoreEnv()
function topkg/config
, which retrieves environment variables from SSM Parameter Store. Credential_web_page_lambda has a runtime dependency on cognito. Cognito has a deploy time dependency on ApiGwy, and ApiGwy has a deploy time dependency on credential_web_page_lambda. Moving credential_web_page_lambda's environment variables to SSM Parameter Store breaks what would otherwise be a deploy time dependency cycle.pkg/api/response
Types of changes
Checklist
README.md
, inline comments, etc.)CHANGELOG.md
under a## next
release, with a short summary of my changesDependencies and Blockers
Relevant Links
Issue: Optum/dce-cli#33
Further comments