Skip to content

httpsurlconn quickstart message-signing integration#4

Open
charlesoj6205 wants to merge 1 commit intomasterfrom
httpsurlconn-quickstart-msgsign-integration
Open

httpsurlconn quickstart message-signing integration#4
charlesoj6205 wants to merge 1 commit intomasterfrom
httpsurlconn-quickstart-msgsign-integration

Conversation

@charlesoj6205
Copy link
Copy Markdown

Updates quickstart integration work; keeps v1 runtime behavior with v5/message-signing changes commented for reference.

…line with updates to HttpsURLConn service layer. V5 endpoint tested successfully. Instructional files within quickstart require further updates. Reverted quickstart to original V1 state with installation message signing changes commented out.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Android “Shapes App” quickstart to integrate the approov-service httpsurlconn module and provide commented reference wiring for installation message-signing, while tweaking request behavior to better support signed targets.

Changes:

  • Switches the build to include an :approov-service module and depend on it from the app.
  • Adds commented reference code for Approov installation message-signing integration in ShapesApp.
  • Disables automatic redirects for the shapes request to avoid redirect-induced signature invalidation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
shapes-app/settings.gradle Adds :approov-service module inclusion and maps it to a local directory
shapes-app/app/build.gradle Raises minSdkVersion and adds dependency on :approov-service
shapes-app/app/src/main/java/io/approov/shapes/ShapesApp.java Adds commented imports and commented message-signing setup; updates example initialization line
shapes-app/app/src/main/java/io/approov/shapes/MainActivity.java Disables redirect following for the shapes request

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

//include ':approov-sdk'
include ':app'
include ':approov-service'
project(':approov-service').projectDir = new File('/Users/charlesoj/Developer/Quickstarts/approov-service-httpsurlconn/approov-service')

// *** UNCOMMENT THE LINE BELOW FOR APPROOV ***
//ApproovService.initialize(getApplicationContext(), "<enter-your-config-string-here>");
//ApproovService.initialize(getApplicationContext(), "#199896#cjjyY5WNuuhkdzTDYV49eGZfXOYbnQrL16nzxoYqWbc=");
Comment on lines +208 to 210
// Keep the originally signed request target unchanged (redirects can invalidate signatures).
connection.setInstanceFollowRedirects(false);
connection.addRequestProperty("Api-Key", getResources().getString(R.string.shapes_api_key));
defaultConfig {
applicationId "io.approov.shapes"
minSdkVersion 21
minSdkVersion 23
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

Successfully merging this pull request may close these issues.

2 participants