diff --git a/ansible/artifacts/sunbird/login/login-update-password.ftl b/ansible/artifacts/sunbird/login/login-update-password.ftl index 6bb0167c030a60a3d4c13bbc6dde83b0c71661a1..269d5e10caa7d621001f66d8fb1bcc911fadd030 100644 --- a/ansible/artifacts/sunbird/login/login-update-password.ftl +++ b/ansible/artifacts/sunbird/login/login-update-password.ftl @@ -26,7 +26,7 @@ </label> <div class="ui search"> <div class="ui mt-8 icon input"> - <input class="" type="password" id="password-new" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" name="password-new" autocomplete="off" onkeydown="javascript:validatePassword()"/> + <input class="" type="password" id="password-new" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" name="password-new" autocomplete="new-password" onkeydown="javascript:validatePassword()"/> <i class="eye icon link" onclick="viewPassword(this)"></i> <!--i id="preview-hide" class="eye slash icon hide link"></i--> </div> @@ -40,7 +40,7 @@ <label id="password-confirmLabelPlaceholder" class="activeLabelColor hide" for="password-confirm"> ${msg("passwordConfirm")} </label> - <input type="password" class="mt-8" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" id="password-confirm" name="password-confirm" autocomplete="off" onkeydown="javascript:matchPassword()"/> + <input type="password" class="mt-8" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" id="password-confirm" name="password-confirm" autocomplete="new-password" onkeydown="javascript:matchPassword()"/> <div id="passwd-match-error-msg" class="ui text confpasswderr hide">Passwords do not match</div> </div> <div class="field"> diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index 61963c09fc89d23cd1ccea6c044e14f357e0cc1b..793b426680d9d8a94f882b58fa40905389bdfaab 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -41,7 +41,7 @@ <#-- TODO: need to find alternative for prepopulating username --> <input class="mt-8" id="username" name="username" placeholder="Enter your email / mobile number" type="text" disabled /> <#else> - <input class="mt-8" id="username" name="username" placeholder="Enter your email / mobile number" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" type="text" autofocus autocomplete="off" /> + <input class="mt-8" id="username" name="username" placeholder="Enter your email / mobile number" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" type="text" autofocus autocomplete="username" /> </#if> </div> <div class="field mb-8"> @@ -54,7 +54,7 @@ ${msg("placeholderForPassword")} </label> </div> - <input placeholder="${msg('passwordPlaceholder')}" class=" mt-8" id="password" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" name="password" type="password" autocomplete="off" /> + <input placeholder="${msg('passwordPlaceholder')}" class=" mt-8" id="password" onfocusin="inputBoxFocusIn(this)" onfocusout="inputBoxFocusOut(this)" name="password" type="password" autocomplete="current-password" /> <span class="ui text error hide" id="inCorrectPasswordError">${msg("inCorrectPasswordError")}</span> </div> <div class="remember-forgot-row"> diff --git a/ansible/artifacts/sunbird/login/template.ftl b/ansible/artifacts/sunbird/login/template.ftl index 94c48b51cd60868aa171b99c4c9cc6ddd2394bd4..597358b24bfa450da3ffc94cc9d644752d5416b8 100644 --- a/ansible/artifacts/sunbird/login/template.ftl +++ b/ansible/artifacts/sunbird/login/template.ftl @@ -38,6 +38,7 @@ </head> <body class="${properties.kcBodyClass!}"> + <main> <div id="kc-logo"><a href="${properties.kcLogoLink!'#'}" title="kc-logo-wrapper"><div id="kc-logo-wrapper"></div><span class="hide">kc-logo</span></a></div> <div id="kc-container" class="${properties.kcContainerClass!}"> @@ -116,6 +117,7 @@ </div> </div> </div> + </main> </body> </html> </#macro> diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index b8d01924573f8247b5174fea5201f40e5e86790a..d4a99dc7872052b3d118c282ca82677bd3f5b459 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -599,7 +599,8 @@ collection { allowedContentTypes = ["TextBook","Collection","Course"] maxFirstLevelUnits=30 ttl = 86400 - + maxUnitFieldLength=120 + maxDescFieldLength=1500 contentTypeToUnitType = {"TextBook": "TextBookUnit", "Course": "CourseUnit", "Collection":"Collection"} headers { folderIdentifier = ["Folder Identifier"] diff --git a/ansible/roles/stack-sunbird/templates/sunbird_player.env b/ansible/roles/stack-sunbird/templates/sunbird_player.env index 76fdce64ae215fa84a05a7605a418f4300f1f274..b2d2fa33b114503d68c662e9db13f7b7ffdd14d6 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_player.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_player.env @@ -171,6 +171,7 @@ sunbird_google_oauth_ios_clientSecret={{sunbird_google_oauth_ios_clientSecret | #Release-4.2.0 #variable for the crypto key to encrypt any content or userinfo that will be used by the external sunbird users crypto_encryption_key_external={{crypto_encryption_key_external|default("")}} +vdnURL={{vdnURL|default("")}} #Release-4.3.0 # default token for device register API fallback diff --git a/exporters/Go/tcp-logger/README.md b/exporters/Go/tcp-logger/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e0ca3db716a12e34984d39f1d30f1111aa60620a --- /dev/null +++ b/exporters/Go/tcp-logger/README.md @@ -0,0 +1,11 @@ +## Usage + +This application will help to debug network communication via TCP by proxying the connection while printing the data to terminal console. For example, if ApplicationA -> ApplicationB and there is some issue in the data recieved by ApplicationB, you can run ApplicationA -> tcp_proxy -> ApplicationB. + +ApplicationB listens to 8080 + +We'll start tcp_proxy as `./tcp_proxy -l 0.0.0.0:9999 -r localhost:8080` in ApplicationB Machine. Then we'll remap, ApplicationA to point to `APplicationB machine ip address:8080`, which will proxy to applicationB while printing the data to terminal. + +## Build + +`CGO_ENABLED=0 go build -o tcp_proxy ./main.go` diff --git a/exporters/Go/tcp-logger/go.mod b/exporters/Go/tcp-logger/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..0b9913076d5dc36e8f49ab9c46ae6f81751f659d --- /dev/null +++ b/exporters/Go/tcp-logger/go.mod @@ -0,0 +1,3 @@ +module github.com/project-sunbird/sunbird-devops/exporters/Go/tcp-logger + +go 1.17 diff --git a/exporters/Go/tcp-logger/main.go b/exporters/Go/tcp-logger/main.go new file mode 100644 index 0000000000000000000000000000000000000000..1a20cc99f9304dc1f12350a36334e493a74ad84c --- /dev/null +++ b/exporters/Go/tcp-logger/main.go @@ -0,0 +1,62 @@ +// vim: set nofoldenable: +// Author: rjshrjdnrn <rjshrjndrn@gmail.com> + +// This application will proxy tcp connecion while printing the logs to console. +package main + +import ( + "flag" + "fmt" + "io" + "log" + "net" + "os" +) + +var localAddr *string = flag.String("l", "localhost:9999", "local address") +var remoteAddr *string = flag.String("r", "localhost:8888", "remote address") + +func main() { + flag.Parse() + fmt.Printf("Listening: %v\nProxying: %v\n\n", *localAddr, *remoteAddr) + + listener, err := net.Listen("tcp", *localAddr) + if err != nil { + panic(err) + } + for { + // Creating a listener + conn, err := listener.Accept() + log.Println("New connection", conn.RemoteAddr()) + if err != nil { + log.Println("error accepting connection", err) + continue + } + go func() { + // Closing the listener + defer conn.Close() + // Creating connection to remote server, proxy connection. + conn2, err := net.Dial("tcp", *remoteAddr) + if err != nil { + log.Println("error dialing remote addr", err) + return + } + // Closing proxy connection + defer conn2.Close() + // Creating channel to copy the data + closer := make(chan struct{}, 2) + // Copy local data to remotet server + go copy(closer, conn2, conn) + // Copy proxy data to local listener + go copy(closer, conn, conn2) + // Waiting for the data to be written + <-closer + log.Println("Connection complete", conn.RemoteAddr()) + }() + } +} + +func copy(closer chan struct{}, dst io.Writer, src io.Reader) { + io.Copy(os.Stdout, io.TeeReader(src, dst)) + closer <- struct{}{} // connection is closed, send signal to stop proxy +}