Skip to content

Commit

Permalink
Staging -> Main v1.0.0 (#45)
Browse files Browse the repository at this point in the history
* Setup project (#1)

* Update README and add boilerplate leagal docs

* Add top-level .gitignore

* Add base IdentityEdge extension

* Add Makefile

* Add CircleCI config

* Rename files from IdentityEdge to Identity

* Update README installation instructions

* Use extension name constant.

* [AMSDK-11119] - Rename to IdentityEdge, Move to identity package + added Listeners (#2)

* [AMSDK-11119] - Rename to IdentityEdge, Move to identity package + listeners

* Add functional testing to CI (#3)

* Add circleci job to run functional tests in an emulator

* Fix yaml formatting in circleci config

* rename circleci job to build-and-unit-test

* Call Make targets when running functional tests

* [AMSDK-11019] ECID handling in Identity Edge (#4)

* Add ECID and tests

* Add IdentityMap from Edge extension

* Create IdentityEdgeProperties and tests

* Add utils copied from Edge

* Create storage service

* Add required constants

* Create IdentityEdgeState and tests

* Rename extension version test class

* Add doc comment

* Doc comment for storage service

* Remove configuration handling

* Fix IdentityEdgeState log tag

* update event names

* Make ECID parameter final

* Update class comment for IdentityEdgeProperties

* Make getECID protected

* getIdentityProperties -> getIdentityEdgeProperties

* Remove config listener and remove unused imports

* Make IdentityEdgeState methods protected

* Add test for ECID(final String ecidString)

* Remove config listener

* Fix complier issue

* Remove test to be added in a following PR

* persist data in xdm format

* Use extension name as datastore name

* Update listener doc comment

* Update event type in doc comment

* Save after generating ECID and add assertion in test

* Add null check in IdentityMap.fromData

* Add null check in IdentityEdgeProperties.readECIDFromIdentityMap

* Improve doc comments, logs, and handle empty/null ECID string

* Add tests for storage service

* [AMSDK-11079] Add getEcid API (#5)

* Add ECID and tests

* Add IdentityMap from Edge extension

* Create IdentityEdgeProperties and tests

* Add utils copied from Edge

* Create storage service

* Add required constants

* Create IdentityEdgeState and tests

* Rename extension version test class

* Add doc comment

* Doc comment for storage service

* Remove configuration handling

* Fix IdentityEdgeState log tag

* update event names

* Make ECID parameter final

* Update class comment for IdentityEdgeProperties

* Make getECID protected

* getIdentityProperties -> getIdentityEdgeProperties

* Remove config listener and remove unused imports

* Make IdentityEdgeState methods protected

* Add test for ECID(final String ecidString)

* Remove config listener

* Start on public API

* Fix complier issue

* Remove test to be added in a following PR

* persist data in xdm format

* Use extension name as datastore name

* Update listener doc comment

* Update event type in doc comment

* Save after generating ECID and add assertion in test

* Add null check in IdentityMap.fromData

* Add null check in IdentityEdgeProperties.readECIDFromIdentityMap

* Add tests for IdentityEdgeExtension ECID getter

* Add copyright to IdentityEdgeExtensionTests

* Add tests for public get ECID API

* Improve doc comments, logs, and handle empty/null ECID string

* Add tests for storage service

* remove unused import

* Fix comments and logs

* Fix listener event source

* fix listener source in tests

* Revert un-needed listener change

* Handle case where there are empty IDs

* Add null check for identity map

* Invoke with empty identity map when no ECID found and replace ecidString with toString

* Move ECID read to IdentityMap

* use raw data for API tests

* Ensure when IdentityEdgeProps is empty we dispatch an empty map

* Add test with invalid event data

* add log when failing to get extension api

* [AMSDK-11127] Reset Identities API (#6)

* Add resetIdentties API

* Add required constants

* Add reset listener

* Handle reset event

* Add test for handleRequestEvent

* Add ticket number in TODO

* Update test_ListenersRegistration for new listener

* Improve log and null check

* Don't allow empty when setting shared state and assert ECID length on regeneration

* improve assertion

* [AMSDK-11081] - Update Identities public API (#7)

* [AMSDK-11081] - Rename listener tests

* [AMSDK-11081] - Listeners for remove and update Identity requests + tests

* [AMSDK-11081] - UpdateIdentity Public API

* Add IdentityItem to IdentityMap (#8)

* Add IdentityItem

* Add tests for identity item

* add convince overloaded constructor

* Throw IllegalArgumentException if id null and add test

* Add override for hashCode

* Update access levels and update API signatures in IdentityItem

* Clean up merge

* Fix java doc

* fix java doc

* invert expression

* Deep copy on getIdentityItemsForNamespace

* Invert params

* Add throws to javadoc

* move throws doc to bottom of comment

* use @link for javadoc

* Rename IdentityEdge event type to EdgeIdentity

* Add final

* Add test for equals

* Fix assertion

* Add import

* [AMSDK-11082] Get identities API (#11)

* Add getIdentities API

* Add java doc and fix event name in log

* Rename test

* Use JSON string for test and update auth state json key

* Fix auth key in tests

* fix sentence in java doc

* [Dev] - Introducing the Goodness of Functional test helpers + First functional test (#9)

* [Dev] - Add the functional test helpers + first valid functional test

* [Dev] - First functional test

* [Dev] - Assertion fail on misread of persistence in TestPersistence helper method

* Migrate ECID from direct Identity extension (#13)

* Add method to load ECID from direct Identity datastore.

* Load ECID from direct identity during IdentityState bootup

* Add secondary ecid to IdentityProperties

* Add API to update legacy ECID in IdentityState

* Add listener for Hub Shared State changes from direct Identity to update legacy ECID value.

* Correct copywrite on new files

* Make ListenerHubSharedStateTests class public

* handle class cast exceptions and mark local variables final

* Make ECID class final and add unit tests for equals and hashCode

* Correct documentation in ListenerHubSharedState

* final local variables

* [AMSDK-11210] Remove reset identities API (#12)

* Remove rest identities API

* Update doc comment in listener

* Add reset complete event source

* Update event source for reset response event

* Add unit test to verify secondary Ecid is not set if primary is not set (#15)

* Add unit test to verify secondary ECID is not set if primary is not set

* Make class variables final

* [AMSDK-11081] - Part 2 Implementation of Update/Remove Identity API (#14)

* [AMSDK-11081] - Update/Remove Identity API implementation

* [AMSDK-11081] - Unit test for IdentityMap and RemoveIdentity Public API

* [AMSDK-11081] - More Unit test for update/Remove

* [AMSDK-11081] - Few more edits to unittests

* [AMSDK-11081] - better naming and typo fixes

* [AMSDK-11081] - rearrange parameters, setECID handling, case-insensitive search and more

* [AMSDK-11081] - Caseinsensitive removal of reserved namespace items + cleanup

* [AMSDK-11081] - cleanup and renaming

* [Dev] - AuthenticationState Renaming and Remove ECID variable (#16)

* [AMSDK-11081] - Rename listener tests

* [AMSDK-11081] - Listeners for remove and update Identity requests + tests

* [AMSDK-11081] - UpdateIdentity Public API

* [AMSDK-11081] - Fix spacings in IdentityMap class

* [Dev] - Add the functional test helpers + first valid functional test

* [Dev] - First functional test

* [Dev] - Assertion fail on misread of persistence in TestPersistence helper method

* [AMSDK-11081] - Update/Remove Identity API implementation

* [AMSDK-11081] - Unit test for IdentityMap and RemoveIdentity Public API

* [AMSDK-11081] - More Unit test for update/Remove

* [AMSDK-11081] - Few more edits to unittests

* [AMSDK-11081] - better naming and typo fixes

* [AMSDK-11081] - rearrange parameters, setECID handling, case-insensitive search and more

* [AMSDK-11081] - Caseinsensitive removal of reserved namespace items + cleanup

* [AMSDK-11081] - cleanup and renaming

* [Dev] - Rename enum to AuthenticatedState and fix its toString

* [Dev] - Enum AuthenticatedState

* [Dev] - removed local ecid and secondaryECID local instances variables

* [AMSDK-11081] - final on IdentityMap, enum string comparison change

* [AMSDK-11140] Renaming to edgeidentity (#17)

* [AMSDK-11140] Renaming to edgeidentity

rename package to edge.identity

rename module to edgeidentity

rename to edgeidentity, extension name, class, listeners, constants

Rename internal classes to Identity*

rename to testApp

Renaming in Makefile, readme

* Updates after rebase

* Review impl - circleci update after renaming

* Don't dispatch reset complete on boot/update/remove (#18)

* [AMSDK-11312] - Handle boot event + Bugfixes (#19)

* [AMSDK-11312] - Handle Boot event and share initial shared state

* [AMSDK-11312] - Bug fix on merge Identities

* [AMSDK-11312] - Bootsup during extension registration

* [AMSDK-11312] - update tests for boot up change

* Cleanup asXDMIdentityMap + unit test renaming

* Add sample app (#20)

* Use correct direct Identity data store name

* Override toString in IdentityMap and IdentityItem

* Add Kotlin test app for IdentityEdge

* Add fragment for starting an Assurance session

* Remove unused test files from sample app.

* Add implementations for send event and reset identities buttons.

* Add Application class to initialize SDK and extensions

* Add network security config to AndroidManifest

* Comment out call to resetIdentities as API in Core is not yet released

* Remove Java app

* Rename 'appkt' to 'app' and move files to 'code/app'

* Remove launch environment ID

* Rename test app package from 'appkt' to 'app'

* fix IdentityMap.toString to handle case where map is empty.

* Use correct AuthenticatedState.loggedOut string

* Save custom identifier UI entries and update UI with saved values when page is viewed.

* Remove copyright from non-source files (Manifest, layouts, drawables, etc).

* Make StringBuilder final in IdentityMap.toString()

* Print AuthenticatedState string when calling IdentityItem.toString (#22)

* [AMSDK-11329] - Functional tests on Edge Identity (#21)

* [AMSDK-11329] - Functional test for EdgeIdentity

* [Dev] : 🧼 Clean up - log, sonar Lint + remove unwanted methods (#24)

* [Dev] - Log fixes + cleanup + fix sonarlint issues

* Add contributing guide and templates (#28)

* Update build scripts for publishing directly to Sonatype (#25)

* Update build script for publishing to sonatype and removing publish to bintray and artifactory.

* Update Makefile with publish targets for sonatype

* Remove publish job from CircleCI configuration.

* Create common build-release Makefile target used by publish targets

* Only include Core dependency when generating POM file for publish

* Remove extra bracket from build.gradle

* Set version to 1.0.0

* Create maven-snapshot.yml (#26)

* Create maven-snapshot.yml

* Use Java 1.7

* Create maven-release.yml (#27)

* Create maven-release.yml

* Use Java 1.7

* Fix step name, publish to staging repo

* Update core dependency to 1.8.0 (#30)

* Update core dependency to 1.8.0

* Add todo to remove mvn url for core

* Run astyle to correct formatting (#31)

* Update failing tests (#34)

* Wait for test threads to finsh to allow direct Identity extension to register

* In ECID handling tests, register both extensions after directly setting legacy ECID in persistence.

* Run 'lint' before assembling build (#35)

* Use Java 8 as it is required for Gradle (#33)

* Use Java 8 as it is required to run Gradle (#32)

* Dev -> staging for 1.0.0 release (#43)

* Use GPG_KEY_ID secret in script (#38)

* Use GPG_KEY_ID secret in script (#37)

* Set mock network service for functional tests (#41)

* Read ECID from IdentityDirect on Boot when registered (#40)

* [AMSDK-11399] Handle install scenario, when Identity direct registered

* [AMSDK-11399] Cleanup, IdentityState unit tests

* Rename test app

* [AMSDK-11399] Add docs for new code

* [AMSDK-11399] Cache events locally until the extension is booted up

* [AMSDK-11399] Fix unit tests

* Code format

* [AMSDK-11399] New tests, fix resetIdentities event source

* [AMSDK-11399] Cleanup

* [AMSDK-11399] Fix null check for getApi

* [AMSDK-11399] Review - docs, cleanup

* Update core version 1.8.0 (#42)

* Fetch identity shared state when needed (#44)

Co-authored-by: Kevin Lind <40409666+kevinlind@users.noreply.github.com>
Co-authored-by: Nick Porter <43650450+nporter-adbe@users.noreply.github.com>
Co-authored-by: Emilia Dobrin <33132425+emdobrin@users.noreply.github.com>
Co-authored-by: Emilia Dobrin <dobrin@adobe.com>
  • Loading branch information
5 people authored Apr 8, 2021
1 parent b2e3e50 commit 712f9b3
Show file tree
Hide file tree
Showing 126 changed files with 11,750 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: 2.1
orbs:
android: circleci/android@1.0

# Workflows orchestrate a set of jobs to be run;
workflows:
version: 2
build-test-deploy:
jobs:
- build-and-unit-test
- functional-test

jobs:
build-and-unit-test:
working_directory: ~/code
docker:
- image: circleci/android:api-29
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- run:
name: Javadoc
command: make ci-javadoc
- store_artifacts:
path: ci/javadoc/build/reports

- run:
name: Build
command: make ci-build

- run:
name: Build App
command: make ci-build-app

- run:
name: UnitTests
command: make ci-unit-test
- store_artifacts:
path: ci/unit-test/build/reports
- store_test_results:
path: ci/unit-test/build/test-results

functional-test:
executor:
name: android/android-machine
resource-class: large
steps:
- checkout
- android/start-emulator-and-run-tests:
# It should match the name seen in the "sdkmanager --list" output
system-image: system-images;android-29;default;x86
# The command to be run, while waiting for emulator startup
post-emulator-launch-assemble-command: make ci-build
# The test command
test-command: make ci-functional-test

- store_artifacts:
path: ci/functional-test/build/reports
- store_test_results:
path: ci/functional-test/build/outputs/androidTest-results


47 changes: 47 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

Thanks for choosing to contribute!

The following are a set of guidelines to follow when contributing to this project.

## Code Of Conduct

This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
you are expected to uphold this code. Please report unacceptable behavior to
[Grp-opensourceoffice@adobe.com](mailto:Grp-opensourceoffice@adobe.com).

## Have A Question?

Start by filing an issue. The existing committers on this project work to reach
consensus around project direction and issue solutions within issue threads
(when appropriate).

## Contributor License Agreement

All third-party contributions to this project must be accompanied by a signed contributor
license agreement. This gives Adobe permission to redistribute your contributions
as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You
only need to submit an Adobe CLA one time, so if you have submitted one previously,
you are good to go!

## Code Reviews

All submissions should come in the form of pull requests and need to be reviewed
by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
for more information on sending pull requests.

Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
submitting a pull request!

## From Contributor To Committer

We love contributions from our community! If you'd like to go a step beyond contributor
and become a committer with full write access and a say in the project, you must
be invited to the project. The existing committers employ an internal nomination
process that must reach lazy consensus (silence is approval) before invitations
are issued. If you feel you are qualified and want to get more deeply involved,
feel free to reach out to existing committers to have a conversation about that.

## Security Issues

Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--- STOP! Before you open an issue please search this repository's issues to see if it has already been reported. This helps reduce duplicate issues from being created. -->
<!--- SECURITY DISCLOSURE: If this is a security disclosure please follow the guidelines in CONTRIBUTING.md. This helps keep folks from accidentally releasing vulnerabilities before the maintainers get a chance to fix the issue. -->

### Expected Behaviour

### Actual Behaviour

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce

#### Platform and Version

#### Sample Code that illustrates the problem

#### Logs taken while reproducing problem
45 changes: 45 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
34 changes: 34 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes
- name: Publish to maven central staging repository
run: make ci-publish-main
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
35 changes: 35 additions & 0 deletions .github/workflows/maven-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- staging
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes
- name: Publish to maven central staging repository
run: make ci-publish-staging
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DSStore
.DS_Store

# Generated files
bin/
build/
ci/

# IntelliJ
*.iml
**/.idea/
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Adobe Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at Grp-opensourceoffice@adobe.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
5 changes: 5 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
© Copyright 2015-2021 Adobe. All rights reserved.

Adobe holds the copyright for all the files found in this repository.

See the LICENSE file for licensing information.
Loading

0 comments on commit 712f9b3

Please sign in to comment.